| 1 | <?php |
||
| 16 | class ValidatedDescription implements DescriptionInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var Description |
||
| 20 | */ |
||
| 21 | private $description; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var Scehma |
||
| 25 | */ |
||
| 26 | private $schema; |
||
| 27 | |||
| 28 | public function __construct(DescriptionInterface $description, Schema $schema) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | public function get($descriptorKey): DescriptorInterface |
||
| 43 | |||
| 44 | /** |
||
| 45 | * {@inheritdoc} |
||
| 46 | */ |
||
| 47 | public function has($descriptor): bool |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | public function all(): array |
||
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | public function set(string $key, DescriptorInterface $descriptor, int $priority = 0) |
||
| 70 | } |
||
| 71 |
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.