clean/assure

View on GitHub

Showing 25 of 25 total issues

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

            function (&$el) {

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

Missing class import via use statement (line '18', column '23').
Open

            throw new \InvalidArgumentException("Value should be $operator $operand");
Severity: Minor
Found in src/assure/IntegerCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '8', column '23').
Open

            throw new \InvalidArgumentException('Empty value given');
Severity: Minor
Found in src/assure/ArrayOfStringsCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '14', column '23').
Open

            throw new \InvalidArgumentException('invalid type given');
Severity: Minor
Found in src/assure/FloatCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '8', column '23').
Open

            throw new \InvalidArgumentException(sprintf("Supplied date '%s' is invalid.", $value));
Severity: Minor
Found in src/assure/DateCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '8', column '23').
Open

            throw new \InvalidArgumentException('Empty array');
Severity: Minor
Found in src/assure/ArrayOfIntegersCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '18', column '23').
Open

            throw new \InvalidArgumentException(sprintf('Invalid type given %s', gettype($value)));
Severity: Minor
Found in src/assure/BooleanCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '19', column '31').
Open

                    throw new \InvalidArgumentException('invalid type given');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '55', column '27').
Open

                throw new \InvalidArgumentException("Unknown operator '$operator' given");
Severity: Minor
Found in src/assure.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Avoid too many return statements within this method.
Open

                return $value != $operand;
Severity: Major
Found in src/assure.php - About 30 mins to fix

Missing class import via use statement (line '20', column '27').
Open

                throw new \InvalidArgumentException('value must be array of integers');
Severity: Minor
Found in src/assure/ArrayOfIntegersCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '8', column '23').
Open

            throw new \InvalidArgumentException('invalid type given');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '12', column '23').
Open

            throw new \InvalidArgumentException('Object cannot be converted to boolean value');
Severity: Minor
Found in src/assure/BooleanCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '16', column '19').
Open

        throw new \InvalidArgumentException(sprintf("Invalid type given '%s', must by an object", gettype($value)));
Severity: Minor
Found in src/assure/ObjectCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Avoid too many return statements within this method.
Open

                return $value < $operand;
Severity: Major
Found in src/assure.php - About 30 mins to fix

Missing class import via use statement (line '19', column '27').
Open

                throw new \InvalidArgumentException('Invalid type given');
Severity: Minor
Found in src/assure/ArrayOfStringsCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '9', column '23').
Open

            throw new \InvalidArgumentException('invalid type given');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '11', column '27').
Open

                throw new \InvalidArgumentException('invalid type given');
Severity: Minor
Found in src/assure/IntegerCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '8', column '23').
Open

            throw new \InvalidArgumentException('Value must be null');
Severity: Minor
Found in src/assure/NullCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '8', column '23').
Open

            throw new \InvalidArgumentException('value must be array');
Severity: Minor
Found in src/assure/SortedArrayCommand.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Severity
Category
Status
Source
Language