rhosocial/yii2-base-models

View on GitHub
traits/AdditionalAccountTrait.php

Summary

Maintainability
A
0 mins
Test Coverage

The 'getPasswordIsSeparate()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getPasswordIsSeparate(): bool
    {
        return $this->getSeparateLogin() && !$this->getIsEmptyPassword();
    }
Severity: Minor
Found in traits/AdditionalAccountTrait.php by phpmd

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

Source https://phpmd.org/rules/naming.html#booleangetmethodname

The 'getSeparateLogin()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getSeparateLogin(): bool
    {
        if (empty($this->separateLoginAttribute)) {
            return false;
        }
Severity: Minor
Found in traits/AdditionalAccountTrait.php by phpmd

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

Source https://phpmd.org/rules/naming.html#booleangetmethodname

Whitespace found at end of line
Open

 * 

Whitespace found at end of line
Open

 * 

Expected 1 newline at end of file; 0 found
Open

}

There are no issues that match your filters.

Category
Status