diff --git a/src/Enums.php b/src/Enums.php index 18c29df..7d0e202 100644 --- a/src/Enums.php +++ b/src/Enums.php @@ -84,8 +84,8 @@ public static function handleStaticCall(string $enum, string $name, array $argum public static function handleCall(object $case, string $name, array $arguments): mixed { return static::$onCall - ? (static::$onCall)($case, $name, $arguments) - : throw new Error(sprintf('Call to undefined method %s::%s()', $case::class, $name)); + ? (static::$onCall)($case, $name, $arguments) /** @phpstan-ignore-next-line property.notFound */ + : throw new Error(sprintf('Call to undefined method %s::%s->%s()', $case::class, $case->name, $name)); } /**