attogram/8queens

View on GitHub
src/solve8queens.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$result' which will lead to PHP notices.
Open

        $result[$name] = $value + $arrayB[$name];
Severity: Minor
Found in src/solve8queens.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$result' which will lead to PHP notices.
Open

    return $result;
Severity: Minor
Found in src/solve8queens.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Variable $result was undeclared, but array fields are being added to it.
Open

        $result[$name] = $value + $arrayB[$name];
Severity: Info
Found in src/solve8queens.php by phan

There are no issues that match your filters.

Category
Status