Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander M. Turek <[email protected]>
  • Loading branch information
greg0ire and derrabus authored Jan 9, 2023
1 parent b85dcad commit ca448ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function getIdentifierColumnNames(ClassMetadata $class, AbstractPlatform
// Association defined as Id field
$joinColumns = $class->associationMappings[$fieldName]['joinColumns'];
$assocQuotedColumnNames = array_map(
static fn ($joinColumn) => isset($joinColumn['quoted'])
static fn (array $joinColumn) => isset($joinColumn['quoted'])
? $platform->quoteIdentifier($joinColumn['name'])
: $joinColumn['name'],
$joinColumns,
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Mapping/ReflectionEnumProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function setValue(mixed $object, mixed $value = null): void
{
if ($value !== null) {
if (is_array($value)) {
$value = array_map(fn ($item): BackedEnum => $this->initializeEnumValue($object, $item), $value);
$value = array_map(fn (int|string|BackedEnum $item): BackedEnum => $this->initializeEnumValue($object, $item), $value);
} else {
$value = $this->initializeEnumValue($object, $value);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function convertWhereInIdentifiersToDatabaseValue(string $type): void

$query->setParameter(
self::PAGINATOR_ID_ALIAS,
array_map(static fn ($id): mixed => $connection->convertToDatabaseValue($id, $type), $identifiers),
array_map(static fn (mixed $id): mixed => $connection->convertToDatabaseValue($id, $type), $identifiers),
);
}
}

0 comments on commit ca448ae

Please sign in to comment.