| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | public function setDynamicMetaData(MetaData $metaData): MetaData |
||
| 45 | { |
||
| 46 | if ($this->installed) { |
||
| 47 | $extensionEntity = $this->extensionRepository->get($metaData->getShortName()); |
||
| 48 | if (null !== $extensionEntity) { |
||
| 49 | $metaData->setUrl($extensionEntity->getUrl()); |
||
| 50 | $metaData->setDisplayName($extensionEntity->getDisplayname()); |
||
| 51 | $metaData->setDescription($extensionEntity->getDescription()); |
||
| 52 | $metaData->setIcon($extensionEntity->getIcon()); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | return $metaData; |
||
| 57 | } |
||
| 59 |
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.