hiqdev /
billing-hiapi
| 1 | <?php |
||
| 2 | |||
| 3 | namespace hiqdev\billing\hiapi\action\Calculate; |
||
| 4 | |||
| 5 | use hiqdev\billing\hiapi\action\ActionRepository; |
||
| 6 | use hiqdev\php\billing\action\Action; |
||
| 7 | |||
| 8 | class ActionCalculateAction |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var ActionRepository |
||
| 12 | */ |
||
| 13 | private $repo; |
||
| 14 | |||
| 15 | public function __construct(ActionRepository $repo) |
||
| 16 | { |
||
| 17 | $this->repo = $repo; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function __invoke(ActionCalculateCommand $command): Action |
||
| 21 | { |
||
| 22 | } |
||
|
0 ignored issues
–
show
|
|||
| 23 | } |
||
| 24 |
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: