framework/components/dbconnection/PDOConnection.php
Avoid unused local variables such as '$errors'. Open
Open
$errors = $this->lastStatement->errorInfo();
- Read upRead up
- Exclude checks
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
Open
$this->setPDO(new PDO($this->getDSN(), $this->getLogin(),
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$this->getPassword(), $params));
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
Open
class PDOConnection extends \pwf\components\dbconnection\abstraction\Connection implements \pwf\basic\interfaces\Component
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
$this->getPassword(), $params));
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
$this->setPDO(new PDO($this->getDSN(), $this->getLogin(),
- Exclude checks
Expected 1 newline at end of file; 0 found Open
Open
}
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
$this->getPassword(), $params));
- Exclude checks