public static function detectDefaultApp(array $apps):array
    {
        foreach ($apps as $oneapp => $val) {
            if ($val['isdefault'] == "yes") {
                return (array("name" => $oneapp, "value" => $val));
            }
        }

        throw new Server500(new \ArrayObject(array("explain" => "No Default app is detected", "solution" =>
            "Please edit apps.json to set a default app")));
    }
public static function detectDefaultApp(array $apps):array
    {
        foreach ($apps as $oneapp => $val) {
            if ($val['isdefault'] == "yes") {
                return (array("name" => $oneapp, "value" => $val));
            }
        }

        throw new Server500(new \ArrayObject(array("explain" => "No Default app is detected", "solution" =>
            "Please edit apps.json to set a default app")));
    }
public static function detectDefaultApp ( array $ apps ) : array { foreach ( $ apps as $ oneapp => $ val ) { if ( $ val [ 'isdefault' ] == "yes" ) { return ( array ( "name" => $ oneapp , "value" => $ val ) ) ; } } throw new Server500 ( new \ ArrayObject ( array ( "explain" => "No Default app is detected" , "solution" => "Please edit apps.json to set a default app" ) ) ) ; }
Detect the default app
@param array $apps App list
@return array The default app
@deprecated  Will remove next major release
@throws \Exception When does not have a default app
Detect the default app