agorlov/lipid

View on GitHub
src/Session/AppSession.php

Summary

Maintainability
A
0 mins
Test Coverage

get accesses the super-global variable $_SESSION.
Open

    public function get($param)
    {
        $this->sessionStart();
        return $_SESSION[$param] ?? null;
    }
Severity: Minor
Found in src/Session/AppSession.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

exists accesses the super-global variable $_SESSION.
Open

    public function exists($param): bool
    {
        $this->sessionStart();
        return array_key_exists($param, $_SESSION);
    }
Severity: Minor
Found in src/Session/AppSession.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 function set($param, $value): void
    {
        $this->sessionStart();
        $_SESSION[$param] = $value;
        session_commit();
Severity: Minor
Found in src/Session/AppSession.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

unset accesses the super-global variable $_SESSION.
Open

    public function unset($param): void
    {
        $this->sessionStart();
        unset($_SESSION[$param]);
        session_commit();
Severity: Minor
Found in src/Session/AppSession.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

There are no issues that match your filters.

Category
Status