Showing 293 of 293 total issues
Blank lines are not allowed in a multi-line function declaration Open
Open
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function guid(mixed $guid, false|string $like = false): static
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 0 Open
Open
*/
- 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 byIdentity(?BaseUserModel $identity = null): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public static function findIdentityByGuid(mixed $guid): ?static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function unreceived(): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function recipients($users = []): static
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public static function isValid(mixed $user): false|static
- Exclude checks
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public ?string $createdAtAttribute = 'created_at',
- Exclude checks
Scope keyword "static" must be followed by a single space Open
Open
public function page(int|string|null $pageSize = 10, ?int $currentPage = 0): 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
Multi-line function declaration not indented correctly; expected 8 spaces but found 0 Open
Open
* @var int Determine the format of timestamp.
- 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 updatedBy($guid): static
- Exclude checks
Expected 1 blank line at end of file; 2 found Open
Open
}
- 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
Blank lines are not allowed in a multi-line function declaration Open
Open
- 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
Function setIPAddress
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function setIPAddress(?string $ipAddress): int|string|null
{
if (!$ipAddress || !$this->enableIP) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"