Showing 42 of 42 total issues
Function buildSelectFieldMap
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
protected function buildSelectFieldMap(Query $query)
{
$selectFieldsMap = [];
$requiredFields = $this->requiredFieldsExtractor->extractRequiredFields($query);
$joins = $this->joinsGenerator->generate($query);
- 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 translateOperator
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function translateOperator($token, FieldInterface $dataSourceElement)
{
$translationTable = [
"T_OP_LT" => [
FilterCondition::METHOD_NUMERIC_LT,
File Interpreter.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Netdudes\DataSourceryBundle\UQL;
use Netdudes\DataSourceryBundle\DataSource\Configuration\Field;
use Netdudes\DataSourceryBundle\DataSource\Configuration\FieldInterface;
Function getCellValueByDataSourceField
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function getCellValueByDataSourceField(array $dataRow, Field $dataSourceField, $fields)
{
$selectAlias = $dataSourceField->getDatabaseSelectAlias();
if (is_array($selectAlias)) {
- 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 transform
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function transform(FilterCondition $filterCondition, array $dataSourceFields)
{
$filter = new Filter();
$filter->setConditionType(Filter::CONDITION_TYPE_OR);
- 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 buildExpression
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function buildExpression(FilterCondition $filterCondition, $token, QueryBuilder $queryBuilder)
{
$identifier = $this->uniqueNameToQueryFieldMap[$filterCondition->getFieldName()];
if (null === $filterCondition->getValue()) {
Method toUQL
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function toUQL()
{
$numericMethods = [
self::METHOD_NUMERIC_EQ,
self::METHOD_NUMERIC_GT,
Method buildSelectFieldMap
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildSelectFieldMap(Query $query)
{
$selectFieldsMap = [];
$requiredFields = $this->requiredFieldsExtractor->extractRequiredFields($query);
$joins = $this->joinsGenerator->generate($query);
Function jsonSerialize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function jsonSerialize()
{
$json = [
'name' => $this->getName(),
'arguments' => [],
- 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 __toString
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function __toString()
{
$reflection = new \ReflectionMethod($this->instance, $this->method);
$methodParameters = $reflection
->getParameters();
- 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 matchAssertion
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function matchAssertion()
{
$identifier = $this->nextToken();
if ($identifier['token'] != 'T_IDENTIFIER') {
Method jsonSerialize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function jsonSerialize()
{
$json = [
'name' => $this->getName(),
'arguments' => [],
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$uniqueName,
$readableName,
$description,
DataTypeInterface $dataType,
$databaseFilterQueryField = null,
Function recursivelyAddDependantAliasFields
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function recursivelyAddDependantAliasFields(array $fieldNames)
{
$dependantFields = [];
foreach ($fieldNames as $fieldName) {
$field = $this->getField($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 build
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function build(Query $query)
{
$elements = [];
$requiredFields = $this->requiredFieldsExtractor->extractRequiredFields($query);
foreach ($this->queryBuilderDataSourceFields as $field) {
- 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 newRawField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function newRawField($name, $type, $field, $alias, $options)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($entityClass, $fields, $transformers, EventDispatcherInterface $eventDispatcher, DriverInterface $doctrineDriver)
Method addVectorField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addVectorField($name, $type, $filteringField, array $aliasedFields, array $options = [])
Method addVectorField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addVectorField($name, $type, $filteringField, array $aliasedFields, array $options = []);
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
UqlExtensionContainer $extensionContainer,
DataSourceInterface $dataSource,
FilterConditionFactory $filterConditionFactory,
ContextFactory $contextFactory,
$caseSensitive = true