| 1 | <?php |
||
| 17 | class Admin extends AuthAdminController{ |
||
| 18 | |||
| 19 | const DOMAIN = 'ROOT'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @Inyectable |
||
| 23 | * @var \PSFS\base\config\Config Configuration service |
||
| 24 | */ |
||
| 25 | protected $config; |
||
| 26 | /** |
||
| 27 | * @Inyectable |
||
| 28 | * @var \PSFS\services\AdminServices Admin service |
||
| 29 | */ |
||
| 30 | protected $srv; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Wrapper de asignación de los menus |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | protected function getMenu() { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Método estático de login de administrador |
||
| 42 | * @param string $route |
||
|
|
|||
| 43 | * @return string HTML |
||
| 44 | * @throws \PSFS\base\exception\FormException |
||
| 45 | */ |
||
| 46 | 1 | public static function staticAdminLogon($route = null) { |
|
| 47 | 1 | if('login' !== Config::getInstance()->get('admin_login')) { |
|
| 48 | 1 | return AdminServices::getInstance()->setAdminHeaders(); |
|
| 49 | } else { |
||
| 50 | $form = new LoginForm(); |
||
| 51 | $form->setData(array("route" => $route)); |
||
| 52 | $form->build(); |
||
| 53 | $tpl = Template::getInstance(); |
||
| 54 | $tpl->setPublicZone(true); |
||
| 55 | return $tpl->render("login.html.twig", array( |
||
| 56 | 'form' => $form, |
||
| 57 | )); |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Método que gestiona el menú de administración |
||
| 63 | * @GET |
||
| 64 | * @route /admin |
||
| 65 | * @visible false |
||
| 66 | * @return string|null |
||
| 67 | */ |
||
| 68 | public function index() { |
||
| 71 | |||
| 72 | } |
||
| 73 |
This check looks for
@paramannotations 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.