| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class RouteSituations extends BaseSituation |
||
| 9 | { |
||
| 10 | 103 | public function hasMethod($method) |
|
| 20 | ]); |
||
| 21 | } |
||
| 22 | |||
| 23 | 58 | public function __call($method, $args) |
|
| 24 | { |
||
| 25 | 58 | $method = str_replace('whenYou', '', $method); |
|
| 26 | 58 | $args = $this->getNormalizedArgs($method, $args); |
|
| 27 | 58 | $this->chain->eventManager = app(RouterEventManager::class)->init($args); |
|
|
|
|||
| 28 | 58 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @param $method |
||
| 32 | * @param $args |
||
| 33 | * |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | 58 | private function getNormalizedArgs($method, $args): array |
|
| 50 | } |
||
| 51 | } |
||
| 52 |
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..