Showing 288 of 288 total issues

The variable $_instances is not named in camelCase.
Open

    private function _rebindHookFxToFakeInstance(\Closure $fx): \Closure
    {
        $fxThis = (new \ReflectionFunction($fx))->getClosureThis();

        $instanceWithoutConstructorCache = new class {
Severity: Minor
Found in src/HookTrait.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_instances is not named in camelCase.
Open

    private function _rebindHookFxToFakeInstance(\Closure $fx): \Closure
    {
        $fxThis = (new \ReflectionFunction($fx))->getClosureThis();

        $instanceWithoutConstructorCache = new class {
Severity: Minor
Found in src/HookTrait.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The method _newObject is not named in camelCase.
Open

    protected function _newObject(string $className, array $ctorArgs): object
    {
        return new $className(...$ctorArgs);
    }
Severity: Minor
Found in src/Factory.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _hasInCollection is not named in camelCase.
Open

    protected function _hasInCollection(string $name, string $collection): bool
    {
        return isset($this->{$collection}[$name]);
    }
Severity: Minor
Found in src/CollectionTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _unbindHookFxIfBoundToThis is not named in camelCase.
Open

    private function _unbindHookFxIfBoundToThis(\Closure $fx, bool $isShort): \Closure
    {
        $fxThis = (new \ReflectionFunction($fx))->getClosureThis();
        if ($fxThis !== $this) {
            return $fx;
Severity: Minor
Found in src/HookTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _getFromCollection is not named in camelCase.
Open

    protected function _getFromCollection(string $name, string $collection): object
    {
        $res = $this->{$collection}[$name] ?? null;
        if ($res === null) {
            throw (new Exception('Element is not in the collection'))
Severity: Minor
Found in src/CollectionTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _lookupConfigElement is not named in camelCase.
Open

    private function &_lookupConfigElement(string $path, bool $createElements = false)
    {
        $path = explode('/', $path);
        $pos = &$this->config;
        foreach ($path as $el) {
Severity: Minor
Found in src/ConfigTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _uniqueElementName is not named in camelCase.
Open

    protected function _uniqueElementName(string $desired): string
    {
        if (!isset($this->_elementNameCounts[$desired])) {
            $this->_elementNameCounts[$desired] = 1;
            $postfix = '';
Severity: Minor
Found in src/ContainerTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _rebindHooksIfCloned is not named in camelCase.
Open

    private function _rebindHooksIfCloned(): void
    {
        if ($this->_hookOrigThis !== null) {
            $hookOrigThis = $this->_hookOrigThis->get();
            if ($hookOrigThis === $this) {
Severity: Minor
Found in src/HookTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _ is not named in camelCase.
Open

    public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string
    {
        $definition = $this->getDefinition($message, $domain ?? 'atk', $locale ?? 'en');

        if ($definition === null) {
Severity: Minor
Found in src/Translator/Adapter/Generic.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _ is not named in camelCase.
Open

    public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string;
Severity: Minor
Found in src/Translator/ITranslatorAdapter.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _removeFromCollection is not named in camelCase.
Open

    protected function _removeFromCollection(string $name, string $collection): void
    {
        if (!$this->_hasInCollection($name, $collection)) {
            throw (new Exception('Element is not in the collection'))
                ->addMoreInfo('collection', $collection)
Severity: Minor
Found in src/CollectionTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _fromSeedPrecheck is not named in camelCase.
Open

    private static function _fromSeedPrecheck($seed, bool $unsafe): void
    {
        if (!is_object($seed)) {
            if (!is_array($seed)) { // @phpstan-ignore function.alreadyNarrowedType
                throw (new Exception('Seed must be an array or an object'))
Severity: Minor
Found in src/DiContainerTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _factory is not named in camelCase.
Open

    protected function _factory($seed, array $defaults): object
    {
        if (!is_array($seed) && !is_object($seed)) { // @phpstan-ignore function.alreadyNarrowedType, booleanAnd.alwaysFalse
            throw new Exception('Use of non-array (' . gettype($seed) . ') seed is not supported');
        }
Severity: Minor
Found in src/Factory.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _rebindHookFxToFakeInstance is not named in camelCase.
Open

    private function _rebindHookFxToFakeInstance(\Closure $fx): \Closure
    {
        $fxThis = (new \ReflectionFunction($fx))->getClosureThis();

        $instanceWithoutConstructorCache = new class {
Severity: Minor
Found in src/HookTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _shorten is not named in camelCase.
Open

    protected function _shorten(string $ownerName, string $itemShortName, ?string $origItemName): string
    {
        $desired = $origItemName ?? $ownerName . '_' . $itemShortName;

        if (TraitUtil::hasAppScopeTrait($this)
Severity: Minor
Found in src/ContainerTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _echoStderr is not named in camelCase.
Open

    protected function _echoStderr(string $message): void
    {
        file_put_contents('php://stderr', $message, \FILE_APPEND);
    }
Severity: Minor
Found in src/DebugTrait.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _ is not named in camelCase.
Open

    public function _(string $message, array $parameters = [], ?string $domain = null, ?string $locale = null): string
    {
        return $this->adapter
            ? $this->adapter->_($message, $parameters, $domain, $locale)
            : Translator::instance()->_($message, $parameters, $domain, $locale);

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _mergeSeeds is not named in camelCase.
Open

    protected function _mergeSeeds(...$seeds)
    {
        // merge seeds but prefer seed over seed2
        // move numerical keys to the beginning and sort them
        $arguments = [];
Severity: Minor
Found in src/Factory.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _onNotSuccessfulTest is not named in camelCase.
Open

    protected function _onNotSuccessfulTest(\Throwable $e): void
    {
        // release objects from uncaught exception as it is never released
        $this->releaseObjectsFromExceptionTrace($e);

Severity: Minor
Found in src/Phpunit/TestCase.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

Severity
Category
Status
Source
Language