YetiForceCompany/YetiForceCRM

View on GitHub
app/Session.php

Summary

Maintainability
A
0 mins
Test Coverage
F
51%

delete accesses the super-global variable $_SESSION.
Open

    public static function delete($key)
    {
        if (empty(static::$pool)) {
            unset($_SESSION[$key]);
        }
Severity: Minor
Found in app/Session.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

get accesses the super-global variable $_SESSION.
Open

    public static function get($key)
    {
        if (empty(static::$pool)) {
            return $_SESSION[$key] ?? null;
        }
Severity: Minor
Found in app/Session.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

set accesses the super-global variable $_SESSION.
Open

    public static function set($key, $value = null)
    {
        if (empty(static::$pool)) {
            return $_SESSION[$key] = $value;
        }
Severity: Minor
Found in app/Session.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

has accesses the super-global variable $_SESSION.
Open

    public static function has($key)
    {
        if (empty(static::$pool)) {
            return isset($_SESSION[$key]);
        }
Severity: Minor
Found in app/Session.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

destroy accesses the super-global variable $_SESSION.
Open

    public static function destroy()
    {
        $_SESSION = [];
        if (\PHP_SAPI !== 'cli' && !headers_sent()) {
            $params = session_get_cookie_params();
Severity: Minor
Found in app/Session.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

The method regenerateId has a boolean flag argument $deleteOldSession, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function regenerateId($deleteOldSession = false)
Severity: Minor
Found in app/Session.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method regenerateId uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            static::$pool->regenerateId($deleteOldSession);
        }
Severity: Minor
Found in app/Session.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Method \App\Session::delete is declared to return bool but has no return value
Open

    public static function delete($key)
Severity: Minor
Found in app/Session.php by phan

Returning type \App\Session\Base but set() is declared to return bool
Open

        return static::$pool->set($key, $value);
Severity: Minor
Found in app/Session.php by phan

Only one argument is allowed per line in a multi-line function call
Open

                $params['secure'], $params['httponly']
Severity: Minor
Found in app/Session.php by phpcodesniffer

Only one argument is allowed per line in a multi-line function call
Open

            setcookie(session_name(), '', time() - 42000,
Severity: Minor
Found in app/Session.php by phpcodesniffer

Only one argument is allowed per line in a multi-line function call
Open

            setcookie(session_name(), '', time() - 42000,
Severity: Minor
Found in app/Session.php by phpcodesniffer

Only one argument is allowed per line in a multi-line function call
Open

                $params['path'], $params['domain'],
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (PHP_SESSION_ACTIVE === \session_status()) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $key
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Returns a session Item representing the specified key.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Confirms if the session contains specified session item.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var \App\Session\Base
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Initialize session class.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static $pool;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Load session driver.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $className = '\App\Session\\' . \Config\Performance::$SESSION_DRIVER;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty(self::$pool) && !empty(\Config\Performance::$SESSION_DRIVER)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $key
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function get($key)
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        \session_start();
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *  @var string Session path
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function load(): bool
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return $_SESSION[$key] ?? null;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function init()
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (self::load()) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return 0;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            static::$pool->regenerateId($deleteOldSession);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (\PHP_SAPI !== 'cli' && !headers_sent()) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $params['path'], $params['domain'],
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Session handler.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Removes the item from the session.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function regenerateId($deleteOldSession = false)
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    const SESSION_PATH = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'cache' . \DIRECTORY_SEPARATOR . 'session';
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            \session_set_save_handler(self::$pool, true);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return true;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return array|string
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return static::$pool->get($key);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function delete($key)
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function clean()
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return static::$pool->cleanAll();
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Destroys all data registered to a session.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @see https://php.net/manual/en/function.session-destroy.php
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            setcookie(session_name(), '', time() - 42000,
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            );
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return static::$pool->getById($sessionId);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $key
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Update the current session id with a newly generated one.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function set($key, $value = null)
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return $_SESSION[$key] = $value;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function destroy()
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $sessionId
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return array
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            self::$pool = new $className();
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return false;
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function has($key)
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param mixed  $value
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string[]
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function getById(string $sessionId): array
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $_SESSION = [];
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $params['secure'], $params['httponly']
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return static::$pool->clean();
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return static::$pool->set($key, $value);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $key
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $params = session_get_cookie_params();
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            \session_regenerate_id($deleteOldSession);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Session Save.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        static::$pool->delete($key);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param bool $deleteOldSession
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        \session_destroy();
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return int
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @see https://php.net/manual/en/function.session-regenerate-id.php
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return static::$pool->has($key);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        } else {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return isset($_SESSION[$key]);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty(static::$pool)) {
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            unset($_SESSION[$key]);
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to clean session. Removed old session.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return [];
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to clean all session.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function cleanAll(): int
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function to get session data by id.
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Session.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return [];
Severity: Minor
Found in app/Session.php by phpcodesniffer

Opening parenthesis of a multi-line function call must be the last content on the line
Open

            setcookie(session_name(), '', time() - 42000,
Severity: Minor
Found in app/Session.php by phpcodesniffer

There are no issues that match your filters.

Category
Status