Showing 32 of 43 total issues
Method __construct
has 28 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public string|SectionTypes $type,
public array $fields = [],
public array $columns = [],
public mixed $empty = null,
public ?bool $flip = null,
Method make
has 28 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string|SectionTypes $type,
array $fields = [],
array $columns = [],
mixed $empty = null,
?bool $flip = null,
Function __destruct
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
public function __destruct()
{
/** @var \Kirby\Cms\ModelWithContent $this */
$key = $this->blueprintCacheKey();
if (static::$blueprintCache) {
- 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"
Further reading
Method options
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
bool|array $changeSlug = true,
bool|array $changeStatus = true,
bool|array $changeTemplate = true,
bool|array $changeTitle = true,
bool|array $create = true,
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public bool|array $changeSlug = true,
public bool|array $changeStatus = true,
public bool|array $changeTemplate = true,
public bool|array $changeTitle = true,
public bool|array $create = true,
Method make
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
bool|array $changeSlug = true,
bool|array $changeStatus = true,
bool|array $changeTemplate = true,
bool|array $changeTitle = true,
bool|array $create = true,
Function preloadCachedBlueprints
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function preloadCachedBlueprints(): int
{
$cdir = static::cacheDir();
if (! $cdir) {
return 0;
- 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"
Further reading
Method make
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
mixed $title,
?string $num = null,
mixed $status = null,
mixed $icon = null,
mixed $image = null,
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public null|string|array $extension = null,
public null|string|array $mime = null,
public ?int $maxheight = null,
public ?int $maxsize = null,
public ?int $maxwidth = null,
Method accept
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string|array|null $extension = null,
string|array|null $mime = null,
?int $maxheight = null,
?int $maxsize = null,
?int $maxwidth = null,
Method make
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string|array|null $extension = null,
string|array|null $mime = null,
?int $maxheight = null,
?int $maxsize = null,
?int $maxwidth = null,
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public mixed $title,
public ?string $num = null,
public mixed $status = null,
public mixed $icon = null,
public mixed $image = null,
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public string $name,
public string $title, // TODO: should be an string OR array of languages
public ?string $description = null, // TODO: should be an string OR array of languages
public ?string $home = null,
public mixed $image = null,
Method make
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $name,
string $title,
?string $description = null,
?string $home = null,
mixed $image = null,
Method make
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $title,
mixed $image = null,
mixed $accept = null,
mixed $options = null,
array $tabs = [],
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public string $title, // TODO: should be an string OR array of languages
public mixed $image = null,
public mixed $accept = null,
public mixed $options = null,
public array $tabs = [],
Method permissions
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
bool|array $access = true,
bool|array $files = true,
bool|array $pages = true,
bool|array $site = true,
bool|array $user = true,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public bool|array $access = true,
public bool|array $files = true,
public bool|array $pages = true,
public bool|array $site = true,
public bool|array $user = true,
Method make
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
bool|array $access = true,
bool|array $files = true,
bool|array $pages = true,
bool|array $site = true,
bool|array $user = true,
Method make
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
array|string $label,
?Icon $icon = null,
?string $id = null,
array $columns = [],
array $sections = [],