Showing 261 of 385 total issues
Avoid deeply nested control flow statements. Open
for (k = 0; k < iRowspan; k++) {
aLayout[i + k][iColShifted + l] = {
cell: nCell,
unique: bUnique,
};
Avoid deeply nested control flow statements. Open
if (cellData === null) {
cellData = '';
}
Avoid deeply nested control flow statements. Open
if (detectedType === 'html') {
break;
}
Avoid deeply nested control flow statements. Open
if (cOption === aoFeatures[k].cFeature) {
featureNode = aoFeatures[k].fnInit(oSettings);
break;
}
Avoid deeply nested control flow statements. Open
if (typeof cellData !== 'string' && cellData.toString) {
cellData = cellData.toString();
}
Avoid deeply nested control flow statements. Open
if (type === 'column-rows') {
rows = _selector_row_indexes(context[i], selector.opts);
}
Function _fnReduce
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function _fnReduce(that, fn, init, start, end, inc) {
Function _fnFilter
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function _fnFilter(settings, input, force, regex, smart, caseInsensitive) {
Avoid deeply nested control flow statements. Open
while (columns.length <= aTargets[j]) {
_fnAddColumn(oSettings);
}
Avoid deeply nested control flow statements. Open
for (k = 0; k < iRowspan; k++) {
aApplied[i + k][j + iColspan] = 1;
}
Avoid deeply nested control flow statements. Open
if (fomatters[column.sType]) {
cellData = fomatters[column.sType](cellData);
}
Function setShippingInformation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function setShippingInformation()
{
if ($this->_checkoutSession->getLastRealOrder()->getIsVirtual()) {
$this->_paymentRequest->setShipping()->setAddressRequired()->withParameters('false');
} else {
- 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
\Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Sales\Model\Order $order,
\UOL\PagSeguro\Helper\Library $library,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Sales\Model\Order $order,
\UOL\PagSeguro\Helper\Library $library,
Function getTitleTypePaymentMethod
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function getTitleTypePaymentMethod($type)
{
if (!is_null($type)) {
switch ($type) {
case 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 searchTransactions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function searchTransactions()
{
try {
$connection = $this->getConnection();
$select = $connection->select()
- 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
\Magento\Directory\Api\CountryInformationAcquirerInterface $countryInformation,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Sales\Model\Order $order,
\UOL\PagSeguro\Helper\Library $library,
Consider simplifying this complex logical expression. Open
if (
nCell.nodeName.toUpperCase() === 'TD' ||
nCell.nodeName.toUpperCase() === 'TH'
) {
/* Get the col and rowspan attributes from the DOM and sanitise them */
Consider simplifying this complex logical expression. Open
if (
isNaN(year) ||
(month === 2 &&
(day < 01 || day > 29 || (day > 28 && parseInt((year / 4),10) !== year / 4)))
) {
Consider simplifying this complex logical expression. Open
if (Digitato !== 8) {
// backspace
for (i = 0; i <= TamanhoMascara; i++) {
boleanoMascara =
Mascara.charAt(i) === '-' ||