Showing 261 of 385 total issues
Function Search
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Search: function (url) {
jQuery
.ajax({
url: url + '/pagseguro/abandoned/request',
data: {
Function Installments
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Installments: function (url, id, brand, isInternational) {
jQuery
.ajax({
url: url + 'pagseguro/direct/installments',
data: {
Function __details_events
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __details_events = function (settings) {
var api = new _Api(settings);
var namespace = '.dt.DT_details';
var drawEvent = 'draw' + namespace;
var colvisEvent = 'column-visibility' + namespace;
Function _fnDetectHeader
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnDetectHeader(aLayout, nThead) {
var nTrs = $(nThead).children('tr');
var nTr, nCell;
var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
var bUnique;
Function _fnBuildHead
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnBuildHead(oSettings) {
var i, ien, cell, row, column;
var thead = oSettings.nTHead;
var tfoot = oSettings.nTFoot;
var createHeader = $('th, td', thead).length === 0;
Function _fnSortListener
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnSortListener(settings, colIdx, append, callback) {
var col = settings.aoColumns[colIdx];
var sorting = settings.aaSorting;
var asSorting = col.asSorting;
var nextSortIdx;
Function Search
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Search: function (url) {
jQuery
.ajax({
url: url + '/pagseguro/cancellation/request',
data: {
Function slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(c.prototype.slide = function(b, d) {
var e = this.$element.find('.item.active'),
f = d || this.getItemForDirection(b, e),
g = this.interval,
h = 'next' === b ? 'left' : 'right',
Function _selector_row_indexes
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _selector_row_indexes = function (settings, opts) {
var i,
ien,
tmp,
a = [],
Method install
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
/**
* Prepare database for install
*/
Function request
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
public function request()
{
//load payments by date
$this->getPagSeguroAbandoned();
- 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 _fnFeatureHtmlPaginate
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnFeatureHtmlPaginate(settings) {
var type = settings.sPaginationType,
plugin = DataTable.ext.pager[type],
modern = typeof plugin === 'function',
redraw = function (settings) {
Function __row_selector
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __row_selector = function (settings, selector, opts) {
var run = function (sel) {
var selInt = _intVal(sel);
var i, ien;
Function backdrop
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(c.prototype.backdrop = function(b) {
var d = this,
e = this.$element.hasClass('fade') ? 'fade' : '';
if (this.isShown && this.options.backdrop) {
var f = a.support.transition && e;
Function _fnFilterData
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnFilterData(settings) {
var columns = settings.aoColumns;
var column;
var i, j, ien, jen, filterData, cellData, row;
var fomatters = DataTable.ext.type.search;
Consider simplifying this complex logical expression. Open
Open
if (
isNaN(day) ||
day < 01 ||
((day < 01 || day > 30) &&
(month === 04 || month === 06 || month === 09 || month === 11)) ||
Function _fnGetCellData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _fnGetCellData(settings, rowIdx, colIdx, type) {
var draw = settings.iDraw;
var col = settings.aoColumns[colIdx];
var rowData = settings.aoData[rowIdx]._aData;
var defaultContent = col.sDefaultContent;
Function placeOrder
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
placeOrder: function () {
var self = this;
var paymentData = quote.paymentMethod();
var messageContainer = this.messageContainer;
// remove previous token error message if it exists
Function validateCpf
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validateCpf(self) {
var cpf = unmask(self.value);
var numeros, digitos, soma, i, resultado, digitos_iguais;
digitos_iguais = 1;
if (cpf.length < 11) {
Function placeOrder
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
placeOrder: function () {
var self = this;
var paymentData = quote.paymentMethod();
var messageContainer = this.messageContainer;
fullScreenLoader.startLoader();