From 9bab4874e0dfc40f931e14e101b35738a768e2ba Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Wed, 1 Apr 2026 02:14:36 -0400 Subject: [PATCH] simplify Flight class --- src/Flight.php | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/src/Flight.php b/src/Flight.php index ddb536f..e59f107 100644 --- a/src/Flight.php +++ b/src/Flight.php @@ -89,40 +89,16 @@ class Flight */ private static Engine $engine; - /** - * Don't allow object instantiation - * - * @codeCoverageIgnore - * @return void - */ - private function __construct() - { - // - } - - /** - * Forbid cloning the class - * - * @codeCoverageIgnore - * @return void - */ - private function __clone() - { - // - } - /** * Handles calls to static methods. * - * @param string $name Method name - * @param array $params Method parameters - * + * @param array $arguments Method parameters * @return mixed Callback results - * @throws Exception + * @throws Throwable */ - public static function __callStatic(string $name, array $params) + public static function __callStatic(string $name, array $arguments) { - return self::app()->{$name}(...$params); + return self::app()->{$name}(...$arguments); } /** @return Engine Application instance */ @@ -132,7 +108,7 @@ class Flight } /** - * Set the engine instance + * Set the engine instance. * * @param Engine $engine Vroom vroom! */