| 1 | <?php |
||
| 21 | class ApplicationInitializeService |
||
| 22 | { |
||
| 23 | use AssertTrait; |
||
| 24 | |||
| 25 | /** @var UserRepository */ |
||
| 26 | private $userRepository; |
||
| 27 | /** @var ValidatorInterface */ |
||
| 28 | private $validator; |
||
| 29 | |||
| 30 | 4 | public function __construct(UserRepository $userRepository, ValidatorInterface $validator) |
|
| 35 | |||
| 36 | 6 | public function createSystemMember(): Member |
|
| 55 | } |
||
| 56 |
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: