Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Claudio Zizza <859964+SenseException@users.noreply.github.com>
  • Loading branch information
greg0ire and SenseException committed Jan 10, 2023
1 parent f9a1e37 commit fe64ec2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Doctrine/ORM/Mapping/MappingException.php
Expand Up @@ -221,7 +221,7 @@ public static function joinColumnMustPointToMappedField(string $className, strin
}

/** @param class-string $className */
public static function classIsNotAValidEntityOrMappedSuperClass($className): self
public static function classIsNotAValidEntityOrMappedSuperClass(string $className): self
{
$parent = get_parent_class($className);
if ($parent !== false) {
Expand Down Expand Up @@ -298,8 +298,7 @@ public static function unsupportedOptimisticLockingType(string $entity, string $
));
}

/** @param string|null $path */
public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null): self
public static function fileMappingDriversRequireConfiguredDirectoryPath(string|null $path = null): self
{
if (! empty($path)) {
$path = '[' . $path . ']';
Expand Down Expand Up @@ -506,7 +505,7 @@ public static function invalidTargetEntityClass(string $targetEntity, string $so
/** @param string[] $cascades */
public static function invalidCascadeOption(array $cascades, string $className, string $propertyName): self
{
$cascades = implode(', ', array_map(static fn (string $e) => "'" . $e . "'", $cascades));
$cascades = implode(', ', array_map(static fn (string $e): string => "'" . $e . "'", $cascades));

return new self(sprintf(
"You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'",
Expand Down

0 comments on commit fe64ec2

Please sign in to comment.