marcelog/PAGI

View on GitHub
doc/examples/node/example.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$type'.
Open

    public function errorHandler($type, $message, $file, $line)
Severity: Minor
Found in doc/examples/node/example.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 '$digits'.
Open

        $digits = '';
Severity: Minor
Found in doc/examples/node/example.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

The method signalHandler() contains an exit expression.
Open

        exit(0);
Severity: Minor
Found in doc/examples/node/example.php by phpmd

ExitExpression

Since: 0.2

An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            exit(23);
        }
    }
}

Source https://phpmd.org/rules/design.html#exitexpression

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class MyPagiApplication extends PAGIApplication

Expected 1 space after FUNCTION keyword; 0 found
Open

                function(Node $node) {

Expected 1 blank line at end of file; 2 found
Open

}

There are no issues that match your filters.

Category
Status