Skip to content

Commit

Permalink
Widen parameter type
Browse files Browse the repository at this point in the history
This exception is used in two places, one where $generatedMode is
clearly a string, and another where typing it as a string will cause a
type error, because $generatedMode is supposed to be an int there.
  • Loading branch information
greg0ire committed Nov 13, 2022
1 parent 465c02f commit 3178b4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Doctrine/ORM/Mapping/MappingException.php
Expand Up @@ -824,7 +824,8 @@ public static function invalidFetchMode($className, $annotation)
return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'");
}

public static function invalidGeneratedMode(string $annotation): MappingException
/** @param int|string $annotation */
public static function invalidGeneratedMode($annotation): MappingException
{
return new self("Invalid generated mode '" . $annotation . "'");
}
Expand Down

0 comments on commit 3178b4e

Please sign in to comment.