Showing 42 of 42 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($unexpectedTokenName, $unexpectedTokenValue, array $expectedTokenCategories, array $parsedTokenStream, $message = null)
Function matchAssertion
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function matchAssertion()
{
$identifier = $this->nextToken();
if ($identifier['token'] != 'T_IDENTIFIER') {
- 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 toUQL
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function toUQL()
{
$numericMethods = [
self::METHOD_NUMERIC_EQ,
self::METHOD_NUMERIC_GT,
- 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 fetchData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function fetchData(QueryBuilder $queryBuilder, Query $query, DataSourceInterface $dataSource)
{
$fields = $dataSource->getFields();
$rowCollection = [];
$queryResults = $queryBuilder->getQuery()->getResult();
- 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 matchConcatenation
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function matchConcatenation()
{
$elements = [];
$firstStatement = $this->matchStatement();
- 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 getValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function getValue(ASTAssertion $astSubtree)
{
$value = $astSubtree->getValue();
$operator = $astSubtree->getOperator();
- 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 translateOperator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function translateOperator($token, FieldInterface $dataSourceElement)
{
$translationTable = [
"T_OP_LT" => [
FilterCondition::METHOD_NUMERIC_LT,
- 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 generateJoinDependencyTree
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function generateJoinDependencyTree(array $elements)
{
$subtree = [];
foreach ($elements as $element) {
$parts = explode('.', $element, 2);
- 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 new SearchTextDataType();
Avoid too many return
statements within this method. Open
return $this->buildExpressionForCollection($filterCondition, $identifier, $token, $queryBuilder);
Avoid too many return
statements within this method. Open
return new PercentDataType();
Avoid too many return
statements within this method. Open
return $queryBuilder->expr()->lte($identifier, $token);
Avoid too many return
statements within this method. Open
return new EntityDataType();
Avoid too many return
statements within this method. Open
return $queryBuilder->expr()->lt($identifier, $token);
Avoid too many return
statements within this method. Open
return $queryBuilder->expr()->gte($identifier, $token);
Avoid too many return
statements within this method. Open
return $queryBuilder->expr()->neq($identifier, $token);
Function extractTransformerRequiredFields
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function extractTransformerRequiredFields(array $transformers)
{
$transformersRequiredFields = [];
foreach ($transformers as $transformer) {
foreach ($transformer->getRequiredFieldNames() as $fieldName) {
- 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 handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function handle(Filter $filter, array $dataSourceFields)
{
foreach ($filter as $index => $subFilterOrFilterCondition) {
if ($subFilterOrFilterCondition instanceof Filter) {
$this->handle($subFilterOrFilterCondition, $dataSourceFields);
- 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 createFromJsonSerializable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function createFromJsonSerializable($jsonSerializable)
{
@trigger_error('createFromJsonSerializable() is deprecated and will be removed in 1.0.0. It seems to be unused.', E_USER_DEPRECATED);
if (!count((array) $jsonSerializable)) {
- 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 matchArray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function matchArray()
{
$token = $this->nextToken();
if ($token['token'] != "T_ARRAY_OPEN") {
$this->rewindToken();
- 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"