Showing 108 of 120 total issues
Method items
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function items($query, $modelName, $items, $plan, $logic = 'and', $negate = false)
Method processProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function processProperty($type, $config, $entity, $action, $value = null, $unsetRelated = true)
Function offsetExists
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function offsetExists($offset)
{
if($this->currentOffset === $offset)
return 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
Function processConfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function processConfig($configSlice, $inflector)
{
$sides = array('left' => 'right', 'right' => 'left');
foreach ($sides as $side) {
- 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 execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$fields = array(
$rootIdKey = $this->config->rootIdKey,
$leftKey = $this->config->leftKey,
- 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 preloader
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function preloader($side, $modelConfig, $result, $loader, $parentResult, $relatedLoader)
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($loaders, $side, $modelConfig, $result, $loader, $pivotResult)
Method map
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function map($preloadable, $modelName, $preload, $result, $plan, $loader)
Function updateSkippedOffsets
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function updateSkippedOffsets()
{
$skippedOffsets = array();
foreach($this->skippedIds as $skippedOffset)
if($skippedOffset!==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"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($mappers, $relationships, $models, $planners, $steps, $cascadeDeletMap)
Method getUnlinkPlan
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function getUnlinkPlan($config, $constrainOwners, $owners, $constrainItems, $items, $logic = 'and')
Method addOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addOperatorCondition($logic, $negate, $field, $operator, $values)
Method mapPreload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapPreload($side, $preloadProperty, $result, $plan, $relatedLoader)
Method mapDeleteQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function mapDeleteQuery($deleteQuery, $selectQuery, $modelName, $plan, $path)
Method mapPreload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapPreload($side, $property, $result, $plan, $loader);
Method mapPreload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapPreload($side, $preloadProperty, $reusableResult, $plan, $relatedLoader)
Method addWhereOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($values, $queryMapper, $queryPropertyMap, $container, $config)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($mappers, $loaders, $models, $plans, $steps)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($loaders, $side, $modelConfig, $result, $loader)