1 | <?php |
||
18 | final class PromoteEmployeeHandler |
||
19 | { |
||
20 | /** @var EmployeeRepositoryInterface */ |
||
21 | private $employeeRepository; |
||
22 | |||
23 | /** |
||
24 | * @param EmployeeRepositoryInterface $employeeRepository |
||
25 | */ |
||
26 | public function __construct(EmployeeRepositoryInterface $employeeRepository) |
||
30 | |||
31 | /** |
||
32 | * @param PromoteEmployee $command |
||
33 | */ |
||
34 | public function handle(PromoteEmployee $command) |
||
42 | } |
||
43 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: