Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
43 | public function build(string $uri, \stdClass $definition): Description |
||
44 | { |
||
45 | $resolver = new RefResolver($definition, $uri); |
||
46 | |||
47 | /** @var \stdClass $definition */ |
||
48 | $description = new OpenApiDescription(new Document($uri, $definition = $resolver->resolve())); |
||
49 | |||
50 | if ($this->validator) { |
||
51 | $this->validator->validate($definition); |
||
|
|||
52 | } |
||
53 | |||
54 | return $description; |
||
55 | } |
||
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: