Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions flight/Flight.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ class Flight
/** Framework engine. */
private static Engine $engine;

/** Whether or not the app has been initialized. */
private static bool $initialized = false;

/**
* Don't allow object instantiation
*
Expand Down Expand Up @@ -127,14 +124,7 @@ public static function __callStatic(string $name, array $params)
/** @return Engine Application instance */
public static function app(): Engine
{
if (!self::$initialized) {
require_once __DIR__ . '/autoload.php';

self::setEngine(new Engine());
self::$initialized = true;
}

return self::$engine;
return self::$engine ?? self::$engine = new Engine();
}

/**
Expand Down