mundipagg/magento2

View on GitHub

Showing 453 of 453 total issues

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

        \Magento\Sales\Model\AdminOrder\Product\Quote\Initializer $subject,
        $item,
        \Magento\Quote\Model\Quote $quote,
        \Magento\Catalog\Model\Product $product,
        \Magento\Framework\DataObject $config
Severity: Minor
Found in Model/Sales/AdminOrder/Product/Quote/Plugin/Initializer.php - About 35 mins to fix

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

            OrderAdapterInterface $orderAdapter,
            InfoInterface $payment,
            Session $session,
            CustomerAddressInterface $customerAddressHelper,
            ConfigInterface $config

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

              OrderAdapterInterface $orderAdapter,
              InfoInterface $payment,
              Session $session,
              CustomerAddressInterface $customerAddressHelper,
              ConfigInterface $config

        Function getBoletoLinkFromOrder has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getBoletoLinkFromOrder($info)
            {
                $lastTransId = $info->getLastTransId();
                $orderId = substr($lastTransId, 0, 19);
        
        
        Severity: Minor
        Found in Block/Payment/Info/Billet.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 getAvailableRecurrenceMethods has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getAvailableRecurrenceMethods(
                $recurrenceProducts,
                $mundipaggPaymentsMethods
            ) {
                if (empty($recurrenceProducts)) {
        Severity: Minor
        Found in Observer/PaymentMethodAvailable.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 extractPaymentDataFromMundipaggBilletCreditcard has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function extractPaymentDataFromMundipaggBilletCreditcard(
                $additionalInformation,
                &$paymentData, $payment
            )
            {
        Severity: Minor
        Found in Concrete/Magento2PlatformOrderDecorator.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 placeOrder has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        TwoCreditcardsModel.prototype.placeOrder = function (placeOrderObject) {
            this.placeOrderObject = placeOrderObject;
            var _self = this;
            var errors = false;
        
        
        Severity: Minor
        Found in view/frontend/web/js/core/models/TwoCreditcardsModel.js - 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 placeOrder has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        BoletoCreditcardModel.prototype.placeOrder = function (placeOrderObject) {
            this.placeOrderObject = placeOrderObject;
            var _self = this;
            var errors = false;
        
        
        Severity: Minor
        Found in view/frontend/web/js/core/models/BoletoCreditcardModel.js - 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 getBoletoLinkFromOrder has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getBoletoLinkFromOrder($info)
            {
                $lastTransId = $info->getLastTransId();
                $orderId = substr($lastTransId, 0, 19);
        
        
        Severity: Minor
        Found in Block/Payment/Billet.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 sumInterests has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        PaymentMethodController.prototype.sumInterests = function(interest, selectName) {
            var interest = interest;
            var paymentMethodController = this;
        
            var formObject = paymentMethodController.formObject;
        Severity: Minor
        Found in view/frontend/web/js/core/checkout/PaymentMethodController.js - 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 validate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        TwoCreditcardsModel.prototype.validate = function () {
        
            var formsInvalid = [];
        
            for (id in this.formObject) {
        Severity: Minor
        Found in view/frontend/web/js/core/models/TwoCreditcardsModel.js - 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 getBoletoLinkFromOrder has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getBoletoLinkFromOrder($info)
            {
                $lastTransId = $info->getLastTransId();
                $orderId = substr($lastTransId, 0, 19);
        
        
        Severity: Minor
        Found in Block/Payment/Info/BilletCreditCard.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 getSavedCreditCards has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        PlatformConfig.getSavedCreditCards = function (platFormConfig) {
            var creditCard = null;
            var twoCreditCard = null;
            var billetCreditCard = null;
            var voucherCard = null;
        Severity: Minor
        Found in view/frontend/web/js/core/checkout/PlatformFormBiding.js - 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 getAvailableConfigMethods has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getAvailableConfigMethods()
            {
                $paymentMethods = [];
        
                if ($this->mundipaggConfig->isBoletoEnabled()) {
        Severity: Minor
        Found in Observer/PaymentMethodAvailable.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 getCartItems has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getCartItems()
            {
                $items = [];
                /** @var \Magento\Sales\Model\Order\Item $item */
                foreach ($this->getOrderAdapter()->getItems() as $item) {
        Severity: Minor
        Found in Gateway/Transaction/Base/ResourceGateway/AbstractRequestDataProvider.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 modifyData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function modifyData(array $data)
            {
                /** @var \Magento\Catalog\Model\Product $product */
                $product = $this->locator->getProduct();
                $modelId = $product->getId();
        Severity: Minor
        Found in Ui/DataProvider/Product/Form/Modifier/Plan.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 getCreditCardsBrands has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getCreditCardsBrands()
            {
                $listCardConfig = MPSetup::getModuleConfiguration()->getCardConfigs();
        
                $brands = [];
        Severity: Minor
        Found in Model/Ui/TwoCreditCard/ConfigProvider.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 getCreditCardsBrands has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private function getCreditCardsBrands()
            {
                $listCardConfig = MPSetup::getModuleConfiguration()->getCardConfigs();
        
                $brands = [];
        Severity: Minor
        Found in Model/Ui/BilletCreditCard/ConfigProvider.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 prepareDataSource has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function prepareDataSource(array $dataSource)
            {
                if (!isset($dataSource['data']['items'])) {
                    return $dataSource;
                }
        Severity: Minor
        Found in Ui/Component/Listing/Column/Translate.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 buildProductListInCart has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function buildProductListInCart(Cart $cart)
            {
                $productList = new ProductListInCart();
        
                $itemQuoteList = $cart->getQuote()->getAllVisibleItems();
        Severity: Minor
        Found in Model/Cart/CartConflict.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

        Severity
        Category
        Status
        Source
        Language