From 6afe25ddb5be06f55cfaf69c727cacb82bb253a3 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Sun, 16 Aug 2026 01:01:15 -0400 Subject: [PATCH] simplify object creation without container --- flight/core/Dispatcher.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flight/core/Dispatcher.php b/flight/core/Dispatcher.php index c3d3a79..5cd142f 100644 --- a/flight/core/Dispatcher.php +++ b/flight/core/Dispatcher.php @@ -324,12 +324,11 @@ class Dispatcher $this->verifyValidClassCallable($class, $method, $object); - // Class is a string, and method exists, create the object by hand and inject only the Engine if (is_string($class)) { $class = new $class($this->engine); } - return call_user_func_array([$class, $method], $params); + return $class->$method(...$params); } /**