Showing 293 of 293 total issues
Multi-line function declaration not indented correctly; expected 8 spaces but found 0 Open
Open
*/
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
protected function likeCondition($value, $attribute, $like = false): static
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 0 Open
Open
* @var string|false This attribute determines when the current entity expires.
- Exclude checks
The closing brace for the class must go on the next line after the body Open
Open
}
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public static function isValid(mixed $user): false|static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function createdAtToday(): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function orderByUpdatedAt(int|string $sort = SORT_ASC): static
- Exclude checks
Method name "GUIDTrait::composite_guid_strs" is not in camel caps format Open
Open
public static function composite_guid_strs($guids): string
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function getOpposite(): ?static
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 0 Open
Open
* Set this attribute to false if you do not want to record it and know whether the entity has been edited.
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 0 Open
Open
*/
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function parentGuid(mixed $guid): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function orderByCreatedAt(int|string $sort = SORT_ASC): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function unread(): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function read(): static
- Exclude checks
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public int $enableIP = self::IP_ALL_ENABLED,
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function unreceived(): static
- Exclude checks
The method id has a boolean flag argument $like, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function id(mixed $id, false|string $like = false): static
- Read upRead up
- Exclude checks
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
Open
public function can($permissionName, $params = [], $allowCaching = true)
- Read upRead up
- Exclude checks
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
Open
protected function likeCondition($value, $attribute, $like = false): static
- Read upRead up
- Exclude checks
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) {
}
}