Showing 1,763 of 1,765 total issues

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

    public function loadFromString(string $str, bool $allowParseCache = false): self
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

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

            throw new \TypeError('$fx must be of type Closure');
Severity: Minor
Found in src/JsCallback.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 registerCaption has a boolean flag argument $isSpecific, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function registerCaption(UserAction $action, string $caption, bool $isSpecific = false, ?string $type = null): void
Severity: Minor
Found in src/UserAction/ExecutorFactory.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 addSection has a boolean flag argument $useLabel, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function addSection(?string $title = null, ?Model $entity = null, ?array $fields = null, bool $useTable = false, bool $useLabel = false)
Severity: Minor
Found in src/Card.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 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

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/SessionTrait.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 registerTrigger has a boolean flag argument $isSpecific, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function registerTrigger(string $type, $seed, UserAction $action, bool $isSpecific = false): void
Severity: Minor
Found in src/UserAction/ExecutorFactory.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 js has a boolean flag argument $when, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function js($when = false, $action = null, $selector = null): ?JsExpressionable
Severity: Minor
Found in src/View.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 addActionButton has a boolean flag argument $isDisabled, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function addActionButton($button, $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

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

Missing class import via use statement (line '151', column '45').
Open

                $date = $dateModifier ? new \DateTime($dateModifier) : null;

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

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

    public function tryLoadFromFile(string $filename)
    {
        // realpath() is slow on Windows, so cache it and dedup only directories
        $filenameBase = basename($filename);
        $filename = dirname($filename);
Severity: Minor
Found in src/HtmlTemplate.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 '782', column '23').
Open

            throw new \Exception('Toast is displayed: "' . $this->findElement(reset($toasts), '.content')->getText() . '"');
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 jsDropdown has a boolean flag argument $when, which is a certain sign of a Single Responsibility Principle violation.
Open

    protected function jsDropdown($when = false, $action = null): JsExpressionable
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

The method _setOrAppend has a boolean flag argument $encodeHtml, 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 __construct has a boolean flag argument $includeStorage, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct(View $view, array $args = [], ?JsExpressionable $afterSuccess = null, array $apiConfig = [], bool $includeStorage = false)
Severity: Minor
Found in src/Js/JsReload.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 '47', column '23').
Open

            throw new \TypeError('$fx must be of type Closure');
Severity: Minor
Found in src/JsSse.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 jsAddStoreData has a boolean flag argument $useSession, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function jsAddStoreData(array $data, bool $useSession = false): JsExpressionable
Severity: Minor
Found in src/View.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

Severity
Category
Status
Source
Language