1 | <?php declare(strict_types = 1); |
||
20 | class OpenApiFactory implements StandardFactory |
||
21 | { |
||
22 | /** |
||
23 | * @var DefinitionValidator|null |
||
24 | */ |
||
25 | private $validator; |
||
26 | |||
27 | /** |
||
28 | * Repository constructor. |
||
29 | * |
||
30 | * @param DefinitionValidator|null $validator |
||
31 | */ |
||
32 | public function __construct(DefinitionValidator $validator = null) |
||
36 | |||
37 | /** |
||
38 | * @param string $uri |
||
39 | * @param \stdClass $definition |
||
40 | * |
||
41 | * @return Description |
||
42 | */ |
||
43 | public function build(string $uri, \stdClass $definition): Description |
||
56 | } |
||
57 |
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: