Showing 11 of 11 total issues
Function mapPrototypeVars
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
protected function mapPrototypeVars(): array
{
$prototype_vars = $this->prototype->toArray();
$new_array = [];
$is_volatile = false;
- 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
Function save
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public function save(string $output_dir): void
{
$this->logger()->info("Saving begins");
if(!file_exists($output_dir)) {
mkdir($output_dir);
- 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 mapPrototypeVars
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function mapPrototypeVars(): array
{
$prototype_vars = $this->prototype->toArray();
$new_array = [];
$is_volatile = false;
Function mapPrototypeVars
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
protected function mapPrototypeVars(): array
{
$prototype_vars = $this->prototype->toArray();
$new_array = [];
$may_be_persistent = true;
- 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 mapPrototypeVars
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function mapPrototypeVars(): array
{
$prototype_vars = $this->prototype->toArray();
$new_array = [];
$may_be_persistent = true;
Method save
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function save(string $output_dir): void
{
$this->logger()->info("Saving begins");
if(!file_exists($output_dir)) {
mkdir($output_dir);
Function assertParity
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function assertParity(): void
{
$ignored_classes = [];
$object_exists = false;
$actor_exists = false;
- 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 _checkFieldDirectives
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function _checkFieldDirectives(array $directives): array
{
$dirs = [
"sha1" => false,
"md5" => false,
Function _checkFieldDirectives
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected static function _checkFieldDirectives(array $directives): array
{
$dirs = [
"sha1" => false,
"md5" => false,
- 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 assertParity
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function assertParity(): void
{
$ignored_classes = [];
$object_exists = false;
$actor_exists = false;
Method addField
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addField(string $name, string $type, bool $is_nullable, bool $is_list, bool $is_native, array $constraints, array $directives): void