From 7ed5efb199d3a1c8962b04f529f1c7261610b17a Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Thu, 3 Oct 2024 12:23:31 -0300 Subject: [PATCH] Update error message --- src/Enums.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } /**