Showing 261 of 385 total issues
Consider simplifying this complex logical expression. Open
if (i.length) {
var j = i.index(c.target);
38 === c.which && j > 0 && j--,
40 === c.which && j < i.length - 1 && j++, ~j || (j = 0),
i.eq(j).trigger('focus');
Consider simplifying this complex logical expression. Open
if (
(b[0] < 2 && b[1] < 9) ||
(1 === b[0] && 9 === b[1] && b[2] < 1) ||
b[0] > 3
)
Consider simplifying this complex logical expression. Open
if (
(j[f] === a && k[m].match(/[0-9]/)) ||
(j[f] === b && k[m].match(/[a-zA-Z]/)) ||
(j[f] === c && k[m].match(/[0-9a-zA-Z]/))
)
Function __columnData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var __columnData = function (settings, column, r1, r2, rows) {
Function number
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
number: function (thousands, decimal, precision, prefix, postfix) {
Function fnUpdate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
this.fnUpdate = function (mData, mRow, iColumn, bRedraw, bAction) {
Function _selector_run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var _selector_run = function (type, selector, selectFn, settings, opts) {
Function Payment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Payment: function (url, id, hash, document, bank) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Sales\Model\Order $order,
\UOL\PagSeguro\Helper\Library $library,
$data = array()
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Framework\ObjectManagerInterface $objectManager,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Framework\Model\ResourceModel\Db\Context $context,
\UOL\PagSeguro\Model\OrdersFactory $ordersFactory,
\UOL\PagSeguro\Model\System\Config\Environment $environmentConfig
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
\Magento\Sales\Api\OrderRepositoryInterface $order,
\Magento\Sales\Api\Data\OrderStatusHistoryInterface $history,
\Magento\Framework\Module\ModuleList $moduleList,
\Magento\Framework\Model\ResourceModel\Db\Context $context
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Checkout\Model\Session $checkoutSession,
\Magento\Sales\Model\Order\Config $orderConfig,
\Magento\Framework\App\Http\Context $httpContext,
array $data = []
Function validateDocument
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function validateDocument(self) {
var value = unmask(self.value);
if (value.length === 11) {
status = validateCpf(self);
} else if (value.length === 14) {
- 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 assignData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function assignData(\Magento\Framework\DataObject $data)
{
parent::assignData($data);
$info = $this->getInfoInstance();
- 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 request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function request()
{
$this->getTransactions();
if (! is_null($this->_PagSeguroPaymentList->getTransactions())) {
foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) {
- 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 request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function request()
{
$this->getTransactions();
if (! is_null($this->_PagSeguroPaymentList->getTransactions())) {
- 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 too many return
statements within this function. Open
return $(nodes)
.filter(sel)
.map(function () {
return this._DT_RowIndex;
})
Avoid too many return
statements within this function. Open
return host.length ? [host.data('dt-column')] : [];
Avoid too many return
statements within this function. Open
return [sel._DT_CellIndex.row];
Avoid too many return
statements within this function. Open
return jqResult;