src/Session.php
public static function getInstance(): SessionInterface
    {
        if (static::$session instanceof SessionInterface) {
            return static::$session;
        }

        if (strlen(static::$name) < 1) {
            throw new \Exception("Cannot start session, no name has been specified, you must call Session::name() before using this class");
        }

        static::$session = new SessionInstance(static::$name);

        return static::$session;
    }
public static function getInstance(): SessionInterface
    {
        if (static::$session instanceof SessionInterface) {
            return static::$session;
        }

        if (strlen(static::$name) < 1) {
            throw new \Exception("Cannot start session, no name has been specified, you must call Session::name() before using this class");
        }

        static::$session = new SessionInstance(static::$name);

        return static::$session;
    }
public static function getInstance ( ) : SessionInterface { if ( static :: $ session instanceof SessionInterface ) { return static :: $ session ; } if ( strlen ( static :: $ name ) < 1 ) { throw new \ Exception ( "Cannot start session, no name has been specified, you must call Session::name() before using this class" ) ; } static :: $ session = new SessionInstance ( static :: $ name ) ; return static :: $ session ; }
Ensure the session instance has been created.

@return SessionInterface
Ensure the session instance has been created .