Showing 68 of 159 total issues
Method aroundAddButton
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
View $subject,
\Closure $proceed,
string $buttonId,
array $data,
int $level = 0,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Context $context,
TypeListInterface $cacheTypeList,
Pool $cacheFrontendPool,
JsonFactory $resultJsonFactory,
StoreManagerInterface $storeManager,
Function generatePagBankInterest
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function generatePagBankInterest(
$cartId,
CreditCardBinInterface $creditCardBin,
InstallmentSelectedInterface $installmentSelected
) {
- 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 isThreeDsApplicable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function isThreeDsApplicable(\Magento\Checkout\Model\Cart $cart, $storeId = null): bool
{
$quote = $cart->getQuote();
if (!$this->hasThreeDsAuth($storeId)) {
- 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
Config $resourceConfig,
EncryptorInterface $encryptor,
StoreManagerInterface $storeManager,
ConfigBase $configBase,
ClientFactory $httpClientFactory,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ConfigBase $configBase,
ConfigCc $configCc,
Cart $cart,
CcConfig $ccConfig,
Source $assetSource,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Backend\Block\Context $context,
\Magento\Backend\Model\Auth\Session $authSession,
\Magento\Framework\View\Helper\Js $jsHelper,
\Magento\Config\Model\Config $backendConfig,
SecureHtmlRenderer $secureRenderer,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ConfigDeepLink $config,
CartInterface $cart,
CcConfig $ccConfig,
Escaper $escaper,
Source $assetSource
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ConfigBoleto $config,
CartInterface $cart,
CcConfig $ccConfig,
Escaper $escaper,
Source $assetSource
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ConfigPix $config,
CartInterface $cart,
CcConfig $ccConfig,
Escaper $escaper,
Source $assetSource
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
StoreManagerInterface $storeManager,
ConfigBase $configBase,
ClientFactory $httpClientFactory,
Json $json,
ThreeDsSessionDataInterfaceFactory $sessionData
Method collectLogger
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
$uri,
$headers,
$response,
$request = [],
$message = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Json $json,
ObjectManagerInterface $objectManager,
OrderPaymentExtensionInterfaceFactory $payExtensionFactory,
ConfigCc $configCc,
PaymentTokenFactoryInterface $paymentTokenFactory = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Logger $logger,
Config $config,
NotifierInterface $notifierInterface,
Update $update,
CollectionFactory $collectionFactory
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
State $state,
SearchCriteriaBuilder $searchCriteria,
OrderRepositoryInterface $orderRepository,
DateTime $date,
TimezoneInterface $localeDate
Function getUrlToConnect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getUrlToConnect()
{
$storeId = $this->getStore(false)->getId();
$urlConnect = Config::ENDPOINT_CONNECT_PRODUCTION;
$appId = Config::APP_ID_PRODUCTION;
- 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 getPubHeader
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPubHeader($storeId = null)
{
$environment = $this->getAddtionalValue('environment', $storeId);
$pub = $this->getAddtionalValue('cipher_text_production', $storeId);
$app = $this->getTypeApp($storeId);
- 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 getPurchaseItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getPurchaseItems(
$order
) {
$result = [];
$items = $order->getItems();
- 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 getIcons
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getIcons()
{
if (!empty($this->icons)) {
return $this->icons;
}
- 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 false;