| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | protected function dispatchToRouter() |
||
| 13 | { |
||
| 14 | // Whilst Laravel provides the package Router instance within all app |
||
| 15 | // code, it is hardcoded in the base Kernel class and needs to be set |
||
| 16 | // directly here when we are using custom JSON API router extensions. |
||
| 17 | parent::__construct($this->app, $this->app['router']); |
||
| 18 | |||
| 19 | return parent::dispatchToRouter(); |
||
| 20 | } |
||
| 21 | } |
||
| 22 |
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: