Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function loadContainersInternalMiddlewares() |
||
17 | { |
||
18 | // TODO: might need refactoring to get rid of the functions on the PortKernel |
||
19 | |||
20 | // Registering single and grouped middleware's |
||
21 | $portKernel = App::make(PortKernel::class); |
||
22 | $portKernel->registerMiddlewares($this->middleware); |
||
|
|||
23 | $portKernel->registerMiddlewareGroups($this->middlewareGroups); |
||
24 | |||
25 | // Registering Route Middleware's |
||
26 | foreach ($this->routeMiddleware as $key => $routeMiddleware) { |
||
27 | $this->app['router']->middleware($key, $routeMiddleware); |
||
28 | } |
||
29 | } |
||
30 | } |
||
31 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: