| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | { |
||
| 20 | $this->registerMiddlewareGroups($this->middlewareGroups); |
||
|
|
|||
| 21 | $this->registerRouteMiddleware($this->routeMiddleware); |
||
| 22 | } |
||
| 23 | |||
| 24 | |||
| 25 | /** |
||
| 26 | * Registering Route Group's |
||
| 27 | * |
||
| 28 | * @void |
||
| 29 | */ |
||
| 30 | private function registerMiddlewareGroups(array $middlewareGroups = []) |
||
| 31 | { |
||
| 32 | foreach ($middlewareGroups as $key => $middleware) { |
||
| 33 | $this->app['router']->middlewareGroup($key, $middleware); |
||
| 34 | } |
||
| 51 |
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: