Showing 1,769 of 1,771 total issues

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

            throw new \Exception('Page contains elements with duplicate ID: ' . implode(', ', array_map(static fn ($v) => '"' . $v . '"', $duplicateIds)));
Severity: Minor
Found in src/Behat/Context.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 '859', column '23').
Open

            throw new \Exception('Value: "' . $value . '" not set using selector: ' . $selector);
Severity: Minor
Found in src/Behat/Context.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 '160', column '49').
Open

                        $value->setTimezone(new \DateTimeZone($this->timezone));
Severity: Minor
Found in src/Persistence/Ui.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

The method addActionMenuItem has a boolean flag argument $isDisabled, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function addActionMenuItem($view, $action = null, string $confirmMsg = '', $isDisabled = false)
Severity: Minor
Found in src/Grid.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method _setOrAppend has a boolean flag argument $throwIfNotFound, which is a certain sign of a Single Responsibility Principle violation.
Open

    protected function _setOrAppend($tag, ?string $value = null, bool $encodeHtml = true, bool $append = false, bool $throwIfNotFound = true): void
Severity: Minor
Found in src/HtmlTemplate.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method jsClose has a boolean flag argument $when, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function jsClose($section, $when = false): JsExpressionable
Severity: Minor
Found in src/Accordion.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '89', column '28').
Open

            $changes = new \stdClass();
Severity: Minor
Found in src/Behat/RwDemosContextTrait.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

The method encodeJson has a boolean flag argument $forceObject, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function encodeJson($data, bool $forceObject = false): string
Severity: Minor
Found in src/App.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

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

        throw new \Exception('jQuery did not finish within a time limit');
Severity: Minor
Found in src/Behat/Context.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 '808', column '23').
Open

            throw new \Exception('Text does not match between: ' . $compareSelector . ' and ' . $compareToSelector);
Severity: Minor
Found in src/Behat/Context.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

The method applyLimit has a boolean flag argument $limit, which is a certain sign of a Single Responsibility Principle violation.
Open

    protected function applyLimit($limit = true): void
Severity: Minor
Found in src/Form/Control/Lookup.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

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

    public function getFieldDef(Field $field): array
    {
        return [
            'name' => $field->shortName,
            'type' => $field->type,
Severity: Minor
Found in src/Form/Control/Multiline.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

Missing class import via use statement (line '147', column '29').
Open

                $date = new \DateTime('+' . $this->get('number_days') . ' days');

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

The method atomicSession has a boolean flag argument $readAndCloseImmediately, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function atomicSession(\Closure $fx, bool $readAndCloseImmediately = false)
Severity: Minor
Found in src/App/SessionManager.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method jsCloseOthers has a boolean flag argument $when, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function jsCloseOthers($when = false): JsExpressionable
Severity: Minor
Found in src/Accordion.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method jsToggle has a boolean flag argument $when, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function jsToggle($section, $when = false): JsExpressionable
Severity: Minor
Found in src/Accordion.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method jsChecked has a boolean flag argument $when, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function jsChecked($when = false, $action = null): JsExpressionable
Severity: Minor
Found in src/Form/Control/Checkbox.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

The method addButton has a boolean flag argument $isDisabled, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function addButton($button, $action = null, string $confirmMsg = '', $isDisabled = false)
Severity: Minor
Found in src/Table/Column/ActionButtons.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

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

Missing class import via use statement (line '117', column '29').
Open

                $date = new \DateTime('-' . $this->get('number_days') . ' days');

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 '177', column '27').
Open

                throw new \Exception('Page contains uncaught exception');
Severity: Minor
Found in src/Behat/Context.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