We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db84fb6 + 78e3a5e commit 2bb058eCopy full SHA for 2bb058e
flight/Flight.php
@@ -87,9 +87,6 @@ class Flight
87
/** Framework engine. */
88
private static Engine $engine;
89
90
- /** Whether or not the app has been initialized. */
91
- private static bool $initialized = false;
92
-
93
/**
94
* Don't allow object instantiation
95
*
@@ -127,14 +124,7 @@ public static function __callStatic(string $name, array $params)
127
124
/** @return Engine Application instance */
128
125
public static function app(): Engine
129
126
{
130
- if (!self::$initialized) {
131
- require_once __DIR__ . '/autoload.php';
132
133
- self::setEngine(new Engine());
134
- self::$initialized = true;
135
- }
136
137
- return self::$engine;
+ return self::$engine ?? self::$engine = new Engine();
138
}
139
140
0 commit comments