mundipagg/magento2

View on GitHub

Showing 253 of 453 total issues

File InstallSchema.php has 1314 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php


namespace MundiPagg\MundiPagg\Setup;

Severity: Major
Found in Setup/InstallSchema.php - About 3 days to fix

    File Magento2PlatformOrderDecorator.php has 945 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace MundiPagg\MundiPagg\Concrete;
    
    use Magento\Customer\Model\ResourceModel\CustomerRepository;
    Severity: Major
    Found in Concrete/Magento2PlatformOrderDecorator.php - About 2 days to fix

      File UpgradeData.php has 708 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      
      namespace MundiPagg\MundiPagg\Setup;
      
      
      Severity: Major
      Found in Setup/UpgradeData.php - About 1 day to fix

        File PaymentMethodController.js has 606 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        var PaymentMethodController = function (methodCode, platformConfig) {
            this.methodCode = methodCode;
            this.platformConfig = platformConfig;
        };
        
        
        Severity: Major
        Found in view/frontend/web/js/core/checkout/PaymentMethodController.js - About 1 day to fix

          File Recurrence.php has 561 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          namespace MundiPagg\MundiPagg\Setup;
          
          use Magento\Eav\Setup\EavSetup;
          use Magento\Eav\Setup\EavSetupFactory;
          Severity: Major
          Found in Setup/Recurrence.php - About 1 day to fix

            Magento2PlatformOrderDecorator has 62 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Magento2PlatformOrderDecorator extends AbstractPlatformOrderDecorator
            {
                /** @var Order */
                protected $platformOrder;
            
            
            Severity: Major
            Found in Concrete/Magento2PlatformOrderDecorator.php - About 1 day to fix

              File PlatformFormBiding.js has 489 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              var FormObject = {};
              var PlatformConfig = {};
              
              PlatformConfig.bind = function (platformConfig) {
                  grandTotal = parseFloat(platformConfig.grand_total);
              Severity: Minor
              Found in view/frontend/web/js/core/checkout/PlatformFormBiding.js - About 7 hrs to fix

                File Plan.php has 469 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Copyright © Magento, Inc. All rights reserved.
                 * See COPYING.txt for license details.
                 */
                Severity: Minor
                Found in Ui/DataProvider/Product/Form/Modifier/Plan.php - About 7 hrs to fix

                  Method installRecurrenceCharge has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function installRecurrenceCharge(SchemaSetupInterface $installer)
                      {
                          $tableName = $installer->getTable(
                              'mundipagg_module_core_recurrence_charge'
                          );
                  Severity: Major
                  Found in Setup/InstallSchema.php - About 6 hrs to fix

                    File Magento2CoreSetup.php has 448 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    namespace MundiPagg\MundiPagg\Concrete;
                    
                    use Magento\Framework\App\Config as Magento2StoreConfig;
                    Severity: Minor
                    Found in Concrete/Magento2CoreSetup.php - About 6 hrs to fix

                      AbstractRequestDataProvider has 45 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      abstract class AbstractRequestDataProvider
                      {
                          protected $orderAdapter;
                          protected $payment;
                      
                      

                        Method installProductsPlan has 142 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function installProductsPlan(SchemaSetupInterface $installer)
                            {
                                $tableName = $installer->getTable('mundipagg_module_core_recurrence_products_plan');
                                if (!$installer->getConnection()->isTableExists($tableName)) {
                                    $customer = $installer->getConnection()
                        Severity: Major
                        Found in Setup/InstallSchema.php - About 5 hrs to fix

                          Method installTransaction has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function installTransaction(
                                  SchemaSetupInterface $installer
                              ) {
                                  $tableName = $installer->getTable('mundipagg_module_core_transaction');
                                  if (!$installer->getConnection()->isTableExists($tableName)) {
                          Severity: Major
                          Found in Setup/InstallSchema.php - About 5 hrs to fix

                            Method installRecurrenceSubscription has 135 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function installRecurrenceSubscription(SchemaSetupInterface $installer)
                                {
                                    $tableName = $installer->getTable(
                                        'mundipagg_module_core_recurrence_subscription'
                                    );
                            Severity: Major
                            Found in Setup/InstallSchema.php - About 5 hrs to fix

                              Method getConfig has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getConfig()
                                  {
                                      $config = [
                                          'payment' => [
                                              'ccform' => [
                              Severity: Major
                              Found in Model/Ui/Base/GenericInstallmentsConfigProvider.php - About 4 hrs to fix

                                Function beforeInitializeLinks has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function beforeInitializeLinks(
                                        \Magento\Catalog\Model\Product\Initialization\Helper\ProductLinks $subject,
                                        \Magento\Catalog\Model\Product $product,
                                        array $links
                                    ) {

                                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

                                File UpgradeSchema.php has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                namespace MundiPagg\MundiPagg\Setup;
                                
                                use Magento\Framework\Setup\UpgradeSchemaInterface;
                                use Magento\Framework\Setup\ModuleContextInterface;
                                Severity: Minor
                                Found in Setup/UpgradeSchema.php - About 4 hrs to fix

                                  Method installCharge has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function installCharge(
                                          SchemaSetupInterface $installer
                                      ) {
                                          $tableName = $installer->getTable('mundipagg_module_core_charge');
                                          if (!$installer->getConnection()->isTableExists($tableName)) {
                                  Severity: Major
                                  Found in Setup/InstallSchema.php - About 3 hrs to fix

                                    Method updateVersionZeroOneTwo has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function updateVersionZeroOneTwo($setup)
                                        {
                                            $installer = $setup;
                                            $installer->startSetup();
                                     
                                    Severity: Major
                                    Found in Setup/UpgradeData.php - About 3 hrs to fix

                                      Magento2CoreSetup has 30 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      final class Magento2CoreSetup extends AbstractModuleCoreSetup
                                      {
                                          const MODULE_NAME = 'MundiPagg_MundiPagg';
                                      
                                          protected function setModuleVersion()
                                      Severity: Minor
                                      Found in Concrete/Magento2CoreSetup.php - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language