* @return bool
*/
public static function isAppLoaded(string $app): bool {
- return in_array($app, self::$loadedApps, true);
+ return isset(self::$loadedApps[$app]);
}
/**
// prevent app.php from printing output
ob_start();
foreach ($apps as $app) {
- if (($types === [] or self::isType($app, $types)) && !in_array($app, self::$loadedApps)) {
+ if (!isset(self::$loadedApps[$app]) && ($types === [] || self::isType($app, $types))) {
self::loadApp($app);
}
}
* @throws Exception
*/
public static function loadApp(string $app) {
- self::$loadedApps[] = $app;
+ self::$loadedApps[$app] = true;
$appPath = self::getAppPath($app);
if ($appPath === false) {
return;