This commit is contained in:
Fabien Potencier
2025-02-14 08:43:56 +01:00
parent 561c6629e1
commit 251c0b5da9
12 changed files with 32 additions and 28 deletions
@@ -19,7 +19,7 @@ enum ExpressionParserType: string
case Prefix = 'prefix';
case Infix = 'infix';
static public function getType(object $object): ExpressionParserType
public static function getType(object $object): ExpressionParserType
{
if ($object instanceof PrefixExpressionParserInterface) {
return self::Prefix;
@@ -28,6 +28,6 @@ enum ExpressionParserType: string
return self::Infix;
}
throw new \InvalidArgumentException(\sprintf('Unsupported expression parser type: %s', \get_class($object)));
throw new \InvalidArgumentException(\sprintf('Unsupported expression parser type: %s', $object::class));
}
}