Showing 20 of 20 total issues

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function createKey($class, $id)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

The extends keyword must be on the same line as the class name
Open

    extends \Exception

The implements keyword must be on the same line as the class name
Open

    implements InvalidArgumentExceptionInterface

Function closing brace must go on the next line following the body; found 1 blank lines before brace
Open

    }
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

Remove error control operator '@' on line 136.
Open

    public function delete($key)
    {
        @unlink($this->filename($key));
    }
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Avoid unused parameters such as '$key'.
Open

    public function has($key)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

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

        $items = count($files);
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

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

Avoid unused parameters such as '$values'.
Open

    public function setMultiple($values, $ttl = null)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$ttl'.
Open

    public function setMultiple($values, $ttl = null)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$keys'.
Open

    public function getMultiple($keys, $default = null)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$keys'.
Open

    public function deleteMultiple($keys)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$default'.
Open

    public function getMultiple($keys, $default = null)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$ttl'.
Open

    public function set($key, $value, $ttl = null)
Severity: Minor
Found in src/Cache/FileCache.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Whitespace found at end of line
Open

    // 
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

Whitespace found at end of line
Open

    // 
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

Whitespace found at end of line
Open

            // 
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer

Whitespace found at end of line
Open

    // 
Severity: Minor
Found in src/Cache/FileCache.php by phpcodesniffer
Severity
Category
Status
Source
Language