razielsd/phpSelenide

View on GitHub
lib/Selenide/Condition/Value.php

Summary

Maintainability
A
0 mins
Test Coverage

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

        foreach ($elementList as $index => $e) {
Severity: Minor
Found in lib/Selenide/Condition/Value.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 local variables such as '$index'.
Open

        foreach ($elementList as $index => $e) {
Severity: Minor
Found in lib/Selenide/Condition/Value.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 using static access to class '\PHPUnit\Framework\Assert' in method 'assertCollectionNegative'.
Open

            Assert::assertNotEquals(
                $this->expected,
                $actual,
                'Value must be equal ' . $this->expected . ', actual - ' . $actual
            );
Severity: Minor
Found in lib/Selenide/Condition/Value.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'assertCollectionPositive'.
Open

            Assert::assertEquals(
                $this->expected,
                $actual,
                'Value must be equal ' . $this->expected . ', actual - ' . $actual
            );
Severity: Minor
Found in lib/Selenide/Condition/Value.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

The class Condition_Value is not named in CamelCase.
Open

class Condition_Value extends Condition_Rule
    implements Condition_Interface_Match, Condition_Interface_assertCollection
{


Severity: Minor
Found in lib/Selenide/Condition/Value.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

There are no issues that match your filters.

Category
Status