| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function execute(UseCaseCommandInterface $command): ResponseInterface |
||
| 39 | { |
||
| 40 | if (!isset($this->providers[get_class($command)])) { |
||
| 41 | throw new \InvalidArgumentException('There are no commands assigned to this Handler'); |
||
| 42 | } |
||
| 43 | $provider = $this->providers[get_class($command)]; |
||
| 44 | $bus = $provider->provide([]); |
||
| 45 | if (!$bus) { |
||
| 46 | throw new \Exception('Bus not found'); |
||
| 47 | } |
||
| 48 | |||
| 49 | return $bus->handle($command); |
||
| 50 | } |
||
| 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..