TikiWiki/tiki-manager

View on GitHub
src/Libs/Helpers/PDOWrapper.php

Summary

Maintainability
A
0 mins
Test Coverage

__construct accesses the super-global variable $_ENV.
Open

    public function __construct($dsn, $user = '', $password = '', $options = [])
    {
        $this->dieOnException = $_ENV['PDO_DIE_ON_EXCEPTION_THROWN'];
        $this->hasExtendedDebug = $_ENV['PDO_EXTENDED_DEBUG'];

Severity: Minor
Found in src/Libs/Helpers/PDOWrapper.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

__construct accesses the super-global variable $_ENV.
Open

    public function __construct($dsn, $user = '', $password = '', $options = [])
    {
        $this->dieOnException = $_ENV['PDO_DIE_ON_EXCEPTION_THROWN'];
        $this->hasExtendedDebug = $_ENV['PDO_EXTENDED_DEBUG'];

Severity: Minor
Found in src/Libs/Helpers/PDOWrapper.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

__construct accesses the super-global variable $_ENV.
Open

    public function __construct($dsn, $user = '', $password = '', $options = [])
    {
        $this->dieOnException = $_ENV['PDO_DIE_ON_EXCEPTION_THROWN'];
        $this->hasExtendedDebug = $_ENV['PDO_EXTENDED_DEBUG'];

Severity: Minor
Found in src/Libs/Helpers/PDOWrapper.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

Doc-block of $fetchModeArgs in query contains phpdoc param type mixed which is incompatible with the param type \TikiManager\Libs\Helpers\mixed declared in the signature
Open

     * @param mixed $fetchModeArgs
Severity: Minor
Found in src/Libs/Helpers/PDOWrapper.php by phan

Doc-block of $fetchMode in query is phpdoc param type int which is not a permitted replacement of the nullable param type ?int declared in the signature ('?T' should be documented as 'T|null' or '?T')
Open

     * @param int $fetchMode
Severity: Minor
Found in src/Libs/Helpers/PDOWrapper.php by phan

There are no issues that match your filters.

Category
Status