elisei/pagbank-payment-magento

View on GitHub

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,
Severity: Major
Found in Plugin/SalesOrderViewButtonPlugin.php - About 50 mins to fix

    Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            Context $context,
            TypeListInterface $cacheTypeList,
            Pool $cacheFrontendPool,
            JsonFactory $resultJsonFactory,
            StoreManagerInterface $storeManager,
    Severity: Major
    Found in Controller/Adminhtml/System/Config/Oauth.php - About 50 mins to fix

      Function generatePagBankInterest has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function generatePagBankInterest(
              $cartId,
              CreditCardBinInterface $creditCardBin,
              InstallmentSelectedInterface $installmentSelected
          ) {
      Severity: Minor
      Found in Model/Api/InterestManagement.php - About 45 mins to fix

      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)) {
      Severity: Minor
      Found in Gateway/Config/ConfigCc.php - About 45 mins to fix

      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,
      Severity: Minor
      Found in Model/Api/Credential.php - About 45 mins to fix

        Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                ConfigBase $configBase,
                ConfigCc $configCc,
                Cart $cart,
                CcConfig $ccConfig,
                Source $assetSource,
        Severity: Minor
        Found in Model/Ui/ConfigProviderCc.php - About 45 mins to fix

          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,
          Severity: Minor
          Found in Model/Adminhtml/Source/PaymentGroup.php - About 45 mins to fix

            Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    ConfigDeepLink $config,
                    CartInterface $cart,
                    CcConfig $ccConfig,
                    Escaper $escaper,
                    Source $assetSource
            Severity: Minor
            Found in Model/Ui/ConfigProviderDeepLink.php - About 35 mins to fix

              Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      ConfigBoleto $config,
                      CartInterface $cart,
                      CcConfig $ccConfig,
                      Escaper $escaper,
                      Source $assetSource
              Severity: Minor
              Found in Model/Ui/ConfigProviderBoleto.php - About 35 mins to fix

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        ConfigPix $config,
                        CartInterface $cart,
                        CcConfig $ccConfig,
                        Escaper $escaper,
                        Source $assetSource
                Severity: Minor
                Found in Model/Ui/ConfigProviderPix.php - About 35 mins to fix

                  Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          StoreManagerInterface $storeManager,
                          ConfigBase $configBase,
                          ClientFactory $httpClientFactory,
                          Json $json,
                          ThreeDsSessionDataInterfaceFactory $sessionData
                  Severity: Minor
                  Found in Model/Api/ThreeDsSession.php - About 35 mins to fix

                    Method collectLogger has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $uri,
                            $headers,
                            $response,
                            $request = [],
                            $message = null
                    Severity: Minor
                    Found in Gateway/Http/Client/ApiClient.php - About 35 mins to fix

                      Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              Json $json,
                              ObjectManagerInterface $objectManager,
                              OrderPaymentExtensionInterfaceFactory $payExtensionFactory,
                              ConfigCc $configCc,
                              PaymentTokenFactoryInterface $paymentTokenFactory = null
                      Severity: Minor
                      Found in Gateway/Response/VaultDetailsHandler.php - About 35 mins to fix

                        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                Logger $logger,
                                Config $config,
                                NotifierInterface $notifierInterface,
                                Update $update,
                                CollectionFactory $collectionFactory
                        Severity: Minor
                        Found in Cron/GetStatusUpdate.php - About 35 mins to fix

                          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                  State $state,
                                  SearchCriteriaBuilder $searchCriteria,
                                  OrderRepositoryInterface $orderRepository,
                                  DateTime $date,
                                  TimezoneInterface $localeDate
                          Severity: Minor
                          Found in Model/Console/Command/Orders/Update.php - About 35 mins to fix

                            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;
                            Severity: Minor
                            Found in Block/Adminhtml/System/Config/Oauth.php - About 35 mins to fix

                            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);
                            Severity: Minor
                            Found in Gateway/Config/Config.php - About 35 mins to fix

                            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();
                            Severity: Minor
                            Found in Gateway/Request/ItemsDataRequest.php - About 35 mins to fix

                            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;
                                    }
                            Severity: Minor
                            Found in Model/Ui/ConfigProviderCc.php - About 35 mins to fix

                            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;
                            Severity: Minor
                            Found in view/base/web/js/validation/custom-validation.js - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language