diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index dcc03dae757..f766a76232e 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -354,13 +354,19 @@ private function getShortName(string $className): string return strtolower(end($parts)); } + /** + * Puts the `inherited` and `declared` values into mapping information for fields, associations + * and embedded classes. + * + * @psalm-param array $mapping + */ private function addMappingInheritanceInformation(array &$mapping, ClassMetadata $parentClass): void { - if (!isset($mapping['inherited']) && !$parentClass->isMappedSuperclass) { + if (! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) { $mapping['inherited'] = $parentClass->name; } - if (!isset($mapping['declared'])) { + if (! isset($mapping['declared'])) { $mapping['declared'] = $parentClass->name; } }