Showing 120 of 120 total issues
Method unlinkPlan
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function unlinkPlan($side, $items)
{
$config = $side->config();
$repository = $this->repository($config);
Function processProperty
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function processProperty($type, $config, $entity, $action, $value = null, $unsetRelated = true)
{
if(!$this->isEntityValue($entity))
return;
- 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 add
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function add($items)
{
if(!is_array($items)) {
$items = array($items);
}
- 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 mapDatabaseQuery
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function mapDatabaseQuery($query, $side, $collectionCondition, $plan)
{
$config = $side->config();
$itemRepository = $this->getRepository($config->itemModel);
$ownerRepository = $this->getRepository($config->ownerModel);
- 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 map
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function map($updateDatabaseQuery, $update)
{
$set = array();
$remove = array();
$increments = array();
- 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 handleDelete
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleDelete($side, $reusableResult, $plan, $sidePath)
{
$config = $side->config();
$itemKey = $config->ownerKey;
$itemModel = $config->itemModel;
Method mapTree
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function mapTree($data)
{
$sideConfig = $this->side->config();
$idField = $this->modelConfig->idField;
Method mapDatabaseQuery
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mapDatabaseQuery($query, $side, $collectionCondition, $plan)
{
$dependencies = $this->getMappingDependencies($side);
$config = $dependencies['config'];
$sideRepository = $dependencies['sideRepository'];
Method mapCommon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function mapCommon($query, $databaseQuery, $queryPlan)
{
$modelName = $query->modelName();
$conditions = $query->getConditions();
$requiredPlan = $queryPlan->requiredPlan();
Method linkPlan
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function linkPlan($config, $owner, $items)
{
$ownerRepository = $this->getRepository($config->ownerModel);
$ownerQuery = $ownerRepository->databaseSelectQuery();
Method processProperties
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function processProperties($action, $owners, $ownerProperty, $items)
{
if (!is_array($owners))
$owners = array($owners);
Function processOwner
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function processOwner($action, $config, $owner, $items = array())
{
if(!is_array($items))
$items = array($items);
- 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 loadProperty
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadProperty($property)
{
$this->ensureMapped();
$entity = $property->entity();
$type = $property->side()->type();
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($configs, $conditions, $data, $database, $models, $maps, $mappers, $values)
Function getDocumentByExplodedPath
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function getDocumentByExplodedPath($document, $explodedPath, $createMissing)
{
$last = count($explodedPath) - 1;
foreach($explodedPath as $i => $key) {
$property = $document->get($key);
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$fields = $this->fields();
$data = $this->dataStep->data();
$this->selectQuery->fields($fields);
- 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 in
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function in($query, $queryField, $subquery, $subqueryField, $plan, $logic = 'and', $negate = false)
Method subquery
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function subquery($query, $queryField, $subquery, $subqueryField, $plan, $logic = 'and', $negate = false)
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($loaders, $side, $modelConfig, $result, $loader, $parentResult, $relatedLoader)
Method result
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function result($query, $queryField, $reusableResult, $resultField, $plan, $logic = 'and', $negate = false)