| Total Complexity | 5 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Action |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var CustomerRepository |
||
| 13 | */ |
||
| 14 | private $repo; |
||
| 15 | |||
| 16 | public function __construct(CustomerRepository $repo) |
||
| 17 | { |
||
| 18 | $this->repo = $repo; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function __invoke(Command $command): Customer |
||
| 24 | } |
||
| 25 | |||
| 26 | protected function checkRequiredInput(Command $command) |
||
| 35 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: