rhosocial/yii2-base-models

View on GitHub

Showing 293 of 293 total issues

Multi-line function declaration not indented correctly; expected 8 spaces but found 0
Open

         */

Scope keyword "static" must be followed by a single space
Open

    protected function likeCondition($value, $attribute, $like = false): static
Severity: Minor
Found in traits/QueryTrait.php by phpcodesniffer

Multi-line function declaration not indented correctly; expected 8 spaces but found 0
Open

         * @var string|false This attribute determines when the current entity expires.

The closing brace for the class must go on the next line after the body
Open

}
Severity: Minor
Found in models/BaseMetaModel.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public static function isValid(mixed $user): false|static
Severity: Minor
Found in traits/UserTrait.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public function createdAtToday(): static
Severity: Minor
Found in traits/EntityQueryTrait.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public function orderByUpdatedAt(int|string $sort = SORT_ASC): static
Severity: Minor
Found in traits/EntityQueryTrait.php by phpcodesniffer

Method name "GUIDTrait::composite_guid_strs" is not in camel caps format
Open

    public static function composite_guid_strs($guids): string
Severity: Minor
Found in traits/GUIDTrait.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public function getOpposite(): ?static
Severity: Minor
Found in traits/UserRelationTrait.php by phpcodesniffer

Multi-line function declaration not indented correctly; expected 8 spaces but found 0
Open

         * Set this attribute to false if you do not want to record it and know whether the entity has been edited.

Multi-line function declaration not indented correctly; expected 8 spaces but found 0
Open

         */

Scope keyword "static" must be followed by a single space
Open

    public function parentGuid(mixed $guid): static

Scope keyword "static" must be followed by a single space
Open

    public function orderByCreatedAt(int|string $sort = SORT_ASC): static
Severity: Minor
Found in traits/EntityQueryTrait.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public function unread(): static
Severity: Minor
Found in traits/MessageQueryTrait.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public function read(): static
Severity: Minor
Found in traits/MessageQueryTrait.php by phpcodesniffer

The first parameter of a multi-line function declaration must be on the line after the opening bracket
Open

        public int $enableIP = self::IP_ALL_ENABLED,
Severity: Minor
Found in traits/config/IPConfig.php by phpcodesniffer

Scope keyword "static" must be followed by a single space
Open

    public function unreceived(): static
Severity: Minor
Found in traits/MessageQueryTrait.php by phpcodesniffer

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

    public function id(mixed $id, false|string $like = false): static
Severity: Minor
Found in traits/EntityQueryTrait.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 can has a boolean flag argument $allowCaching, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function can($permissionName, $params = [], $allowCaching = true)
Severity: Minor
Found in web/User.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 likeCondition has a boolean flag argument $like, which is a certain sign of a Single Responsibility Principle violation.
Open

    protected function likeCondition($value, $attribute, $like = false): static
Severity: Minor
Found in traits/QueryTrait.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