Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 6.7968 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | 1 | public static function staticAdminLogon($route = null) |
|
50 | { |
||
51 | 1 | if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
|
52 | if ('login' !== Config::getInstance()->get('admin_login')) { |
||
53 | return AdminServices::getInstance()->setAdminHeaders(); |
||
54 | } else { |
||
55 | $form = new LoginForm(); |
||
56 | $form->setData(array("route" => $route)); |
||
57 | $form->build(); |
||
58 | $tpl = Template::getInstance(); |
||
59 | $tpl->setPublicZone(true); |
||
60 | return $tpl->render("login.html.twig", array( |
||
61 | 'form' => $form, |
||
62 | )); |
||
63 | } |
||
64 | } else { |
||
65 | 1 | return UserController::showAdminManager(); |
|
66 | } |
||
67 | } |
||
68 | |||
82 |
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.