| 1 | <?php |
||
| 21 | class TypeTransformer implements TypeTransformerInterface |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var SettingSchemaRegistryInterface |
||
| 25 | */ |
||
| 26 | private $schemaRegistry; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var TypeRegistry |
||
| 30 | */ |
||
| 31 | private $typeRegistry; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param SettingSchemaRegistryInterface $schemaRegistry |
||
| 35 | * @param TypeRegistryInterface $typeRegistry |
||
| 36 | */ |
||
| 37 | public function __construct(SettingSchemaRegistryInterface $schemaRegistry, TypeRegistryInterface $typeRegistry) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $section |
||
| 45 | * @param string $key |
||
| 46 | * |
||
| 47 | * @return TypeInterface |
||
| 48 | */ |
||
| 49 | private function resolverType(string $section, string $key) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | public function transform(string $section, string $key, $value) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * {@inheritdoc} |
||
| 66 | */ |
||
| 67 | public function reverse(string $section, string $key, $value) |
||
| 71 | } |
||
| 72 |
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.