1 | <?php |
||
18 | class Definition implements DefinitionInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var TypeNameInterface |
||
22 | */ |
||
23 | private $name; |
||
24 | |||
25 | /** |
||
26 | * @var ContextInterface |
||
27 | */ |
||
28 | private $context; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private $arguments = []; |
||
34 | |||
35 | /** |
||
36 | * Definition constructor. |
||
37 | * @param ContextInterface $context |
||
38 | * @param TypeNameInterface $name |
||
39 | */ |
||
40 | public function __construct(ContextInterface $context, TypeNameInterface $name) |
||
45 | |||
46 | /** |
||
47 | * @return iterable|DefinitionArgumentInterface[] |
||
48 | */ |
||
49 | public function getArguments(): iterable |
||
53 | |||
54 | /** |
||
55 | * @param string $name |
||
56 | * @param TypeNameInterface $hint |
||
57 | * @return DefinitionArgumentInterface |
||
58 | */ |
||
59 | public function addArgument(string $name, TypeNameInterface $hint): DefinitionArgumentInterface |
||
63 | |||
64 | /** |
||
65 | * @param string $name |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function hasArgument(string $name): bool |
||
72 | |||
73 | /** |
||
74 | * @param string $name |
||
75 | * @return DefinitionArgumentInterface |
||
76 | */ |
||
77 | public function getArgument(string $name): DefinitionArgumentInterface |
||
81 | |||
82 | /** |
||
83 | * @return TypeNameInterface |
||
84 | */ |
||
85 | public function getName(): TypeNameInterface |
||
89 | |||
90 | /** |
||
91 | * @return ContextInterface |
||
92 | */ |
||
93 | public function getContext(): ContextInterface |
||
97 | |||
98 | /** |
||
99 | * @return bool |
||
100 | */ |
||
101 | public function isGeneric(): bool |
||
105 | } |
||
106 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..