Showing 108 of 120 total issues
Method processItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function processItems($action, $config, $items, $owner = null, $processOldOwner = true)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($config, $type, $builder, $result, $immediateOnly = false)
Method mapQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapQuery($config, $type, $builder, $result, $immediateOnly = false)
Method mapPreload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapPreload($side, $preloadProperty, $reusableResult, $plan, $relatedLoader)
Method preloader
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function preloader($side, $modelConfig, $result, $loader, $pivotResult)
Method addOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addOperatorCondition($logic, $negate, $field, $operator, $values)
Method addWhereOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values);
Method addWhereOperatorCondition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addWhereOperatorCondition($logic, $negate, $field, $operator, $values)
Method mapPreload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapPreload($side, $property, $result, $plan, $relatedLoader)
Method mapPreload
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function mapPreload($side, $property, $result, $plan, $loader)
Method prepareNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function prepareNode($id, $left, $rootId, $innerWidth, $depth)
Function handleDelete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function handleDelete($side, $reusableResult, $plan, $sidePath)
{
$config = $side->config();
$itemKey = $config->ownerKey;
$itemModel = $config->itemModel;
- 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 resetProperties
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function resetProperties($side, $items)
{
$opposing = $this->getOpposing($side->type());
$itemsProperty = $side->config()->get($opposing.'Property');
- 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 asObject
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function asObject($recursive = false)
{
$this->requirePropertyNames();
$data = $this->data->data();
- 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 processRange
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function processRange($left, $right)
{
$key = $this->insertRange($left, $right);
if($left + 1 == $right) {
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
Avoid too many return
statements within this method. Open
return $entity;
Avoid too many return
statements within this method. Open
return false;
Function validateSubtree
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function validateSubtree($data)
{
$leftKey = $this->config->leftKey;
$rightKey = $this->config->rightKey;
- 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 asArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function asArray($entitiesAsObjects = false, $keyField = null)
{
$array = array();
$withKey = $keyField === 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
Function getAdjustment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getAdjustment($offset)
{
$low = 0;
$count = count($this->existingBefore);
$high = $count - 1;
- 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"