Skip to content

Commit 6afe25d

Browse files
committed
simplify object creation without container
1 parent 9e08573 commit 6afe25d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

flight/core/Dispatcher.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,11 @@ public function execute($callback, array $params = [])
324324

325325
$this->verifyValidClassCallable($class, $method, $object);
326326

327-
// Class is a string, and method exists, create the object by hand and inject only the Engine
328327
if (is_string($class)) {
329328
$class = new $class($this->engine);
330329
}
331330

332-
return call_user_func_array([$class, $method], $params);
331+
return $class->$method(...$params);
333332
}
334333

335334
/**

0 commit comments

Comments
 (0)