1 | <?php |
||
17 | abstract class AbstractContext implements ContextInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var array|LocalContext[] |
||
21 | */ |
||
22 | protected $types = []; |
||
23 | |||
24 | /** |
||
25 | * @param TypeDefinition $type |
||
26 | * @return ContextInterface|LocalContext |
||
27 | */ |
||
28 | public function create(TypeDefinition $type): ContextInterface |
||
34 | |||
35 | /** |
||
36 | * @param string $type |
||
37 | * @return bool |
||
38 | */ |
||
39 | protected function has(string $type): bool |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | abstract public function __toString(): string; |
||
48 | } |
||
49 |
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: