Skip to content

Commit

Permalink
Fix CS, hopefully make Psalm 🥳
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Jan 13, 2023
1 parent f16905e commit 76f1eea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, FieldMapping|AssociationMapping|mixed[]> $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;
}
}
Expand Down

0 comments on commit 76f1eea

Please sign in to comment.