Showing 288 of 288 total issues

Property name "$_hookIndexCounter" should not be prefixed with an underscore to indicate visibility
Open

    private int $_hookIndexCounter = 0;
Severity: Minor
Found in src/HookTrait.php by phpcodesniffer

Property name "$_hookOrigThis" should not be prefixed with an underscore to indicate visibility
Open

    private ?\WeakReference $_hookOrigThis = null;
Severity: Minor
Found in src/HookTrait.php by phpcodesniffer

Property name "$_hasTraitCache" should not be prefixed with an underscore to indicate visibility
Open

    private static $_hasTraitCache = [];
Severity: Minor
Found in src/TraitUtil.php by phpcodesniffer

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

                throw new \Error('Call to ' . $visibility . ' method ' . $class . '::' . $name . '() from '
Severity: Minor
Found in src/DynamicMethodTrait.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 addToWithClUnsafe has a boolean flag argument $skipAdd, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function addToWithClUnsafe(object $parent, $seed = [], array $addArgs = [], bool $skipAdd = false)
Severity: Minor
Found in src/StaticAddToTrait.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 '48', column '19').
Open

        throw new \Error('Call to undefined method ' . $class . '::' . $name . '()');
Severity: Minor
Found in src/DynamicMethodTrait.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 '83', column '39').
Open

                        $fxRefl = new \ReflectionFunction($hookData[0]);
Severity: Minor
Found in src/HookTrait.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 '144', column '23').
Open

        $fxRefl = new \ReflectionFunction($fx);
Severity: Minor
Found in src/HookTrait.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 setDefaults has a boolean flag argument $passively, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function setDefaults(array $properties, bool $passively = false)
Severity: Minor
Found in src/DiContainerTrait.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 '161', column '45').
Open

            $paramsReflectionProperty = new \ReflectionProperty(CoreException::class, 'params');
Severity: Minor
Found in src/Phpunit/TestCase.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 '29').
Open

            $propRefl = new \ReflectionProperty($class, $name);
Severity: Minor
Found in src/WarnDynamicPropertyTrait.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 '36', column '43').
Open

                    $dummyInstance = (new \ReflectionClass($class))->newInstanceWithoutConstructor();
Severity: Minor
Found in src/HookTrait.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 '62', column '24').
Open

        $fxThis = (new \ReflectionFunction($fx))->getClosureThis();
Severity: Minor
Found in src/HookTrait.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 '106', column '47').
Open

                    $reflectionProperty = new \ReflectionProperty($class, $k);
Severity: Minor
Found in src/Phpunit/TestCase.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 toSafeString has a boolean flag argument $allowNl, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function toSafeString($val, bool $allowNl = false, int $maxDepth = 2): string

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

    private function &_lookupConfigElement(string $path, bool $createElements = false)
Severity: Minor
Found in src/ConfigTrait.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 '45', column '18').
Open

        if ((new \ReflectionMethod($this, 'init'))->getModifiers() & \ReflectionMethod::IS_PUBLIC) {
Severity: Minor
Found in src/InitializerTrait.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 '24', column '24').
Open

        $fxThis = (new \ReflectionFunction($fx))->getClosureThis();
Severity: Minor
Found in src/HookTrait.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 _addToAdd has a boolean flag argument $skipAdd, which is a certain sign of a Single Responsibility Principle violation.
Open

    private static function _addToAdd(object $parent, object $object, array $addArgs, bool $skipAdd = false): void
Severity: Minor
Found in src/StaticAddToTrait.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 addToWithCl has a boolean flag argument $skipAdd, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function addToWithCl(object $parent, $seed = [], array $addArgs = [], bool $skipAdd = false)// :static supported by PHP8+
Severity: Minor
Found in src/StaticAddToTrait.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