Skip to content

Commit 1e8f9be

Browse files
committed
Avoid $annotation as a parameter name
1 parent 218e6ad commit 1e8f9be

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

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)