$description is of type object<Psi\Component\Des...n\DescriptionInterface>, but the property $description was declared to be of type object<Psi\Component\Description\Description>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?
Our type inference engine has found a suspicous assignment of a value to a property.
This check raises an issue when a value that can be of a given class or a super-class
is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.
It seems like $schema of type object<Psi\Component\Description\Schema\Schema> is incompatible with the declared type object<Psi\Component\Description\Scehma> of property $schema.
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..
Loading history...
32
}
33
34
/**
35
* {@inheritdoc}
36
*/
37
public function get($descriptorKey): DescriptorInterface
38
{
39
$this->schema->validateKey($descriptorKey);
40
41
return $this->description->get($descriptorKey);
42
}
43
44
/**
45
* {@inheritdoc}
46
*/
47
public function has($descriptor): bool
48
{
49
$this->schema->validateKey($descriptor);
50
51
return $this->description->has($descriptor);
52
}
53
54
/**
55
* {@inheritdoc}
56
*/
57
public function all(): array
58
{
59
return $this->description->all();
60
}
61
62
/**
63
* {@inheritdoc}
64
*/
65
public function set(string $key, DescriptorInterface $descriptor, int $priority = 0)
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.