Skip to content

Commit edb6332

Browse files
committed
Avoid $annotation as a parameter name
1 parent 48c1eef commit edb6332

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,9 @@ public function loadMetadataForClass($className, PersistenceClassMetadata $metad
546546
}
547547

548548
/**
549-
* @param mixed[] $joinColumns
550-
* @psalm-param array<string, mixed> $mapping
549+
* @param mixed[] $joinColumns
550+
* @param class-string $className
551+
* @param array<string, mixed> $mapping
551552
*/
552553
private function loadRelationShipMapping(
553554
ReflectionProperty $property,
@@ -660,6 +661,8 @@ private function loadRelationShipMapping(
660661
/**
661662
* Attempts to resolve the fetch mode.
662663
*
664+
* @param class-string $className
665+
*
663666
* @psalm-return ClassMetadata::FETCH_* The fetch mode as defined in ClassMetadata.
664667
*
665668
* @throws MappingException If the fetch mode is not valid.

lib/Doctrine/ORM/Mapping/Driver/AttributeDriver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,8 @@ public function loadMetadataForClass($className, PersistenceClassMetadata $metad
566566
/**
567567
* Attempts to resolve the fetch mode.
568568
*
569-
* @param string $className The class name.
570-
* @param string $fetchMode The fetch mode.
569+
* @param class-string $className The class name.
570+
* @param string $fetchMode The fetch mode.
571571
*
572572
* @return ClassMetadata::FETCH_* The fetch mode as defined in ClassMetadata.
573573
*

lib/Doctrine/ORM/Mapping/MappingException.php

+5-10
Original file line numberDiff line numberDiff line change
@@ -813,20 +813,15 @@ public static function duplicateEntityListener($listenerName, $methodName, $clas
813813
return new self(sprintf('Entity Listener "%s#%s()" in "%s" was already declared, but it must be declared only once.', $listenerName, $methodName, $className));
814814
}
815815

816-
/**
817-
* @param string $className
818-
* @param string $annotation
819-
*
820-
* @return MappingException
821-
*/
822-
public static function invalidFetchMode($className, $annotation)
816+
/** @param class-string $className */
817+
public static function invalidFetchMode(string $className, string $fetchMode): self
823818
{
824-
return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
819+
return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $fetchMode . "'");
825820
}
826821

827-
public static function invalidGeneratedMode(string $annotation): MappingException
822+
public static function invalidGeneratedMode(string $generatedMode): self
828823
{
829-
return new self("Invalid generated mode '" . $annotation . "'");
824+
return new self("Invalid generated mode '" . $generatedMode . "'");
830825
}
831826

832827
/**

0 commit comments

Comments
 (0)