[imp] Change deprecated $app->getCfg() to $app->get() and some CS.
Close #3817, close #3815, close #3814