1 | <?php |
||
21 | final class LazyCustomerLoader implements ChoiceLoaderInterface |
||
22 | { |
||
23 | /** @var CustomerRepositoryInterface */ |
||
24 | private $customerRepository; |
||
25 | |||
26 | public function __construct(CustomerRepositoryInterface $customerRepository) |
||
30 | |||
31 | public function loadChoiceList($value = null): ChoiceListInterface |
||
35 | |||
36 | public function loadChoicesForValues(array $values, $value = null): array |
||
40 | |||
41 | public function loadValuesForChoices(array $choices, $value = null): array |
||
46 | } |
||
47 |
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: