Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class Admin extends AuthAdminController |
||
15 | { |
||
16 | |||
17 | const DOMAIN = 'ROOT'; |
||
18 | |||
19 | /** |
||
20 | * @Injectable |
||
21 | * @var \PSFS\base\config\Config Configuration service |
||
22 | */ |
||
23 | protected $config; |
||
24 | /** |
||
25 | * @Injectable |
||
26 | * @var \PSFS\services\AdminServices Admin service |
||
27 | */ |
||
28 | protected $srv; |
||
29 | |||
30 | /** |
||
31 | * Método estático de login de administrador |
||
32 | * @param string $route |
||
33 | * @return string HTML |
||
34 | * @throws \PSFS\base\exception\FormException |
||
35 | */ |
||
36 | 1 | public static function staticAdminLogon($route = null) |
|
|
|||
37 | { |
||
38 | 1 | if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) { |
|
39 | return AdminServices::getInstance()->setAdminHeaders(); |
||
40 | } else { |
||
41 | 1 | return UserController::showAdminManager(); |
|
42 | } |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Método que gestiona el menú de administración |
||
47 | * @GET |
||
48 | * @route /admin |
||
49 | * @visible false |
||
50 | * @return string|null |
||
51 | */ |
||
52 | public function index() |
||
55 | } |
||
56 | |||
58 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.