| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class RouteSituations extends BaseSituation |
||
| 9 | { |
||
| 10 | public function hasMethod($method) |
||
| 20 | 35 | ]); |
|
| 21 | } |
||
| 22 | |||
| 23 | public function __call($method, $args) |
||
| 24 | { |
||
| 25 | $method = str_replace('whenYou', '', $method); |
||
| 26 | $args = $this->getNormalizedArgs($method, $args); |
||
| 27 | $this->chain->eventManager = app(RouterEventManager::class)->init($args); |
||
|
|
|||
| 28 | 1 | } |
|
| 29 | |||
| 30 | 1 | /** |
|
| 31 | * @param $method |
||
| 32 | * @param $args |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | private function getNormalizedArgs($method, $args): array |
||
| 48 | 2 | ||
| 49 | } |
||
| 51 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..