Showing 481 of 922 total issues
Function handler
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
handler: function (grid, rowIndex, colIndex, item, e, record)
Function renderer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
renderer: function (val, q, rec)
{
var part = rec.getPart();
var total = 0;
var partUnit = "";
- 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 deeply nested control flow statements. Open
if (data[roleName][i].isEntity) {
idProperty = data[roleName][i].idProperty;
delete data[roleName][i].data[idProperty];
}
Avoid deeply nested control flow statements. Open
switch (strtolower($node->args[1]->value->name->parts[0])) {
case 'true':
$value = true;
break;
case 'false':
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ClassMetadata $classMetadata,
$baseEntity,
ReflectionService $reflectionService,
EntityManager $em,
AdvancedSearchFilter $advancedSearchFilter,
Function extractConfiguration
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function extractConfiguration($filterData, $sorterData)
{
$filters = [];
if (is_array($filterData)) {
- 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 deeply nested control flow statements. Open
if (associated === undefined) {
options.associated = deep;
clear = true;
} else {
if (!deep) {
Function getSystemPreference
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getSystemPreference: function (key, defaultValue)
{
if (this.systemPreferenceStore === undefined) {
return defaultValue;
}
- 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 onSuccess
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
onSuccess: function (response) {
try {
var responseObj = Ext.decode(response.responseText);
} catch (e) {
var responseObj = {};
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ManagerRegistry $managerRegistry,
IriConverterInterface $iriConverter,
PropertyAccessorInterface $propertyAccessor,
RequestStack $requestStack,
FilterService $filterService,
Function switchView
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
switchView: function (index)
{
var nextBtn = this.down('#nextBtn'),
previousButton = this.down('#previousButton'),
childViewCount = this.cardContainer.items.getCount();
- 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 getExpressionForFilter
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getExpressionForFilter(Filter $filter, $alias, $paramName)
{
switch (strtolower($filter->getOperator())) {
case Filter::OPERATOR_EQUALS:
return $this->em->getExpressionBuilder()->eq($alias, $paramName);
- 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 parseConfiguration
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function parseConfiguration($configuration)
{
if (!property_exists($configuration, "fieldConfiguration")) {
return false;
- 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 parsebox
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def parsebox(list, n)
assert_type n, :Number
if !n.int?
raise ArgumentError.new("List index #{n} must be an integer")
elsif n.to_i < 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"
Further reading
Function onKernelView
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function onKernelView(GetResponseForControllerResultEvent $event)
{
$controllerResult = $event->getControllerResult();
if ($controllerResult instanceof Response) {
- 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
Consider simplifying this complex logical expression. Open
if (load || store.isLoading()) {
store.on('load', function (store, records, success, operation) {
args = [store, operation];
scope = scope || options.scope || inverseRecord;
Function treeMaker
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
treeMaker: function (node, model, prefix, callback, originalVisitedModels)
Function _onItemKeyPress
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
_onItemKeyPress: function (view, record, item, index, e) {
Function columnRenderer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
columnRenderer: function (value, metadata, record, rowIndex, colIndex)
Function getAssociatedStore
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
getAssociatedStore: function (inverseRecord, options, scope, records, isComplete) {