Showing 108 of 120 total issues
Function merge
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function merge($left, $right)
{
if(count($right) !== 1)
return $this->mergeConditions($left, $right);
- 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 getArrayNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getArrayNode($document, $path, $createMissing = false)
{
list($parent, $key) = $this->getParentDocumentAndKey($document, $path);
if($document === null)
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"
Further reading
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 usedConnections
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function usedConnections()
{
$connections = array();
foreach ($this->steps() as $step) {
foreach($step->usedConnections() as $connection) {
- 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 mapCommon
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function mapCommon($query, $databaseQuery, $queryPlan)
{
$modelName = $query->modelName();
$conditions = $query->getConditions();
$requiredPlan = $queryPlan->requiredPlan();
- 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 isExpandable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function isExpandable($group, $minPrecedance)
{
$conditions = $group->conditions();
foreach($conditions as $key => $condition){
if($key == 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
Function addSide
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function addSide($side)
{
if($side instanceof \PHPixie\ORM\Relationships\Relationship\Side\Relationship) {
$this->mapInstances['relationship']->add($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 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"