1 | <?php |
||
9 | class Kernel implements KernelInterface |
||
10 | { |
||
11 | |||
12 | const PATH_CONFIG = '/../config/'; |
||
13 | |||
14 | use \Nymfonya\Component\Http\Reuse\TKernel; |
||
15 | |||
16 | /** |
||
17 | * instanciate |
||
18 | * |
||
19 | * @param string $env |
||
20 | * @param string $path |
||
21 | */ |
||
22 | 26 | public function __construct(string $env, string $path) |
|
26 | |||
27 | /** |
||
28 | * set controller namespace |
||
29 | * |
||
30 | * @param string $ctrlNamespace |
||
31 | * @return KernelInterface |
||
32 | */ |
||
33 | 26 | public function setNameSpace(string $ctrlNamespace): KernelInterface |
|
38 | |||
39 | /** |
||
40 | * retrieve kernel instance classname from container |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getBundleClassname():string |
||
48 | |||
49 | /** |
||
50 | * run app |
||
51 | * |
||
52 | * @param array $groups |
||
53 | * @return KernelInterface |
||
54 | */ |
||
55 | 3 | public function run(array $groups = []): KernelInterface |
|
76 | |||
77 | /** |
||
78 | * set controller action from router groups |
||
79 | * |
||
80 | * @param array $routerGrps |
||
81 | * @return void |
||
82 | */ |
||
83 | 10 | public function setAction(array $routerGrps) |
|
87 | |||
88 | /** |
||
89 | * dispatch response |
||
90 | * |
||
91 | * @return KernelInterface |
||
92 | */ |
||
93 | 1 | public function send(): KernelInterface |
|
115 | |||
116 | /** |
||
117 | * shutdown kernel |
||
118 | * |
||
119 | * @return void |
||
120 | */ |
||
121 | 1 | public function shutdown(int $code = 0) |
|
125 | } |
||
126 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.