SergioMadness/pwf

View on GitHub
framework/components/dbconnection/PDOConnection.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused local variables such as '$errors'.
Open

        $errors              = $this->lastStatement->errorInfo();

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

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

        $this->setPDO(new PDO($this->getDSN(), $this->getLogin(),

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

            $this->getPassword(), $params));

Line exceeds 120 characters; contains 122 characters
Open

class PDOConnection extends \pwf\components\dbconnection\abstraction\Connection implements \pwf\basic\interfaces\Component

Multi-line function call not indented correctly; expected 8 spaces but found 12
Open

            $this->getPassword(), $params));

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

        $this->setPDO(new PDO($this->getDSN(), $this->getLogin(),

Expected 1 newline at end of file; 0 found
Open

}

Closing parenthesis of a multi-line function call must be on a line by itself
Open

            $this->getPassword(), $params));

There are no issues that match your filters.

Category
Status