Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 7.096 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | 1 | public static function staticAdminLogon($route = null) |
|
41 | { |
||
42 | 1 | if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
|
43 | if ('login' !== Config::getInstance()->get('admin_login')) { |
||
44 | return AdminServices::getInstance()->setAdminHeaders(); |
||
45 | } else { |
||
46 | $form = new LoginForm(); |
||
47 | $form->setData(array("route" => $route)); |
||
48 | $form->build(); |
||
49 | $tpl = Template::getInstance(); |
||
50 | $tpl->setPublicZone(true); |
||
51 | return $tpl->render("login.html.twig", array( |
||
52 | 'form' => $form, |
||
53 | )); |
||
54 | } |
||
55 | } else { |
||
56 | 1 | return UserController::showAdminManager(); |
|
57 | } |
||
58 | } |
||
59 | |||
73 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.