1 | <?php |
||
24 | class Backend implements LoggerAwareInterface |
||
25 | { |
||
26 | use LoggerAwareTrait; |
||
27 | |||
28 | /** |
||
29 | * @var Generator |
||
30 | */ |
||
31 | private $generator; |
||
32 | |||
33 | /** |
||
34 | * @var Validator |
||
35 | */ |
||
36 | private $validator; |
||
37 | |||
38 | /** |
||
39 | * Generator constructor. |
||
40 | * @param Reflection $reflection |
||
41 | */ |
||
42 | public function __construct(Reflection $reflection) |
||
47 | |||
48 | /** |
||
49 | * @param Readable $file |
||
50 | * @param iterable|Definition[] $ir |
||
51 | * @return Document |
||
52 | * @throws Exception\InternalException |
||
53 | */ |
||
54 | public function run(Readable $file, iterable $ir): Document |
||
58 | |||
59 | /** |
||
60 | * @param iterable|Definition[] $ir |
||
61 | * @return iterable|Definition[] |
||
62 | * @throws Exception\InternalException |
||
63 | */ |
||
64 | private function validate(iterable $ir): iterable |
||
70 | } |
||
71 |
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: