Showing 100 of 130 total issues
Consider simplifying this complex logical expression. Open
Open
if ( nCell.nodeName.toUpperCase() == "TD" ||
nCell.nodeName.toUpperCase() == "TH" )
{
/* Get the col and rowspan attributes from the DOM and sanitise them */
iColspan = nCell.getAttribute('colspan') * 1;
Consider simplifying this complex logical expression. Open
Open
if ( invalidated ||
force ||
regex ||
prevSearch.length > input.length ||
input.indexOf(prevSearch) !== 0 ||
Function __columnData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var __columnData = function ( settings, column, r1, r2, rows ) {
Function _selector_run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var _selector_run = function ( type, selector, selectFn, settings, opts )
Function fnUpdate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
Function number
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
number: function ( thousands, decimal, precision, prefix, postfix ) {
Avoid too many return
statements within this function. Open
Open
return [ rowObj.idx ];
Avoid too many return
statements within this function. Open
Open
return jq.map( function(i) {
idx = $.inArray( this, tables );
return idx !== -1 ? settings[idx] : null;
} ).toArray();
Avoid too many return
statements within this function. Open
Open
return host.length ?
[ host.data('dt-row') ] :
[];
Avoid too many return
statements within this function. Open
Open
return aoData[ rowIdx ] && aoData[ rowIdx ].nTr === sel ?
[ rowIdx ] :
[];
Avoid too many return
statements within this function. Open
Open
return function (data, type) { // row and meta also passed, but not used
return data[mSource];
};
Avoid too many return
statements within this function. Open
Open
return host.length ?
[ host.data('dt-column') ] :
[];
Avoid too many return
statements within this function. Open
Open
return [ _fnVisibleToColumnIndex( settings, idx ) ];
Avoid too many return
statements within this function. Open
Open
return [ s._DT_CellIndex.column ];
Avoid too many return
statements within this function. Open
Open
return function (data, val) { // meta is also passed in, but not used
data[mSource] = val;
};
Avoid too many return
statements within this function. Open
Open
return aoData[ cellIdx.row ] && aoData[ cellIdx.row ].nTr === sel.parentNode ?
[ cellIdx.row ] :
[];
Avoid too many return
statements within this function. Open
Open
return $(nodes)
.filter( sel )
.map( function () {
return this._DT_RowIndex;
} )
Avoid too many return
statements within this function. Open
Open
return jqResult;
Function all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function all(): array
{
// Todo - add database storage here
$configs = [];
- 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 all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function all(): array
{
// Todo - add database storage
$configs = [];
- 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"