hipay/hipay-wallet-cashout-mirakl-integration

View on GitHub

Showing 83 of 114 total issues

File bootstrap-multiselect.js has 1156 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Bootstrap Multiselect (http://davidstutz.de/bootstrap-multiselect/)
 *
 * Apache License, Version 2.0:
 * Copyright (c) 2012 - 2017 David Stutz
Severity: Major
Found in web/js/bootstrap-multiselect.js - About 2 days to fix

    Function buildDropdownOptions has 220 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            buildDropdownOptions: function() {
    
                this.$select.children().each($.proxy(function(index, element) {
    
                    var $element = $(element);
    Severity: Major
    Found in web/js/bootstrap-multiselect.js - About 1 day to fix

      Function buildFilter has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              buildFilter: function() {
      
                  // Build filter if filtering OR case insensitive filtering is enabled and the number of options exceeds (or equals) enableFilterLength.
                  if (this.options.enableFiltering || this.options.enableCaseInsensitiveFiltering) {
                      var enableFilterLength = Math.max(this.options.enableFiltering, this.options.enableCaseInsensitiveFiltering);
      Severity: Major
      Found in web/js/bootstrap-multiselect.js - About 3 hrs to fix

        Operation has 29 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Operation implements OperationInterface
        {
            /**
             * @var int
             * @ORM\Id
        Severity: Minor
        Found in src/Entity/Operation.php - About 3 hrs to fix

          Function init has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
                          var $element = $(element);
                          var config = ko.toJS(valueAccessor());
          
                          $element.multiselect(config);
          Severity: Major
          Found in web/js/bootstrap-multiselect.js - About 3 hrs to fix

            Function is_writable_r has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                private function is_writable_r($dir)
                {
                    if (is_dir($dir)) {
                        if (is_writable($dir)) {
                            $objects = scandir($dir);
            Severity: Minor
            Found in src/Controller/SettingController.php - About 3 hrs 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

            LogVendors has 24 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class LogVendors implements LogVendorsInterface
            {
                /**
                 * @var int
                 *
            Severity: Minor
            Found in src/Entity/LogVendors.php - About 2 hrs to fix

              OperationRepository has 23 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class OperationRepository extends AbstractTableRepository implements ManagerInterface
              {
                  protected $privateLabelTemplate = "private {{miraklId}} – {{hipayId}} - {{cycleDate}}";
              
                  protected $publicLabelTemplate = "public {{miraklId}} – {{hipayId}} - {{cycleDate}}";
              Severity: Minor
              Found in src/Entity/OperationRepository.php - About 2 hrs to fix

                Function searchTimeout has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                        this.searchTimeout = this.asyncFunction($.proxy(function() {
                
                                            if (this.query !== event.target.value) {
                                                this.query = event.target.value;
                
                
                Severity: Major
                Found in web/js/bootstrap-multiselect.js - About 2 hrs to fix

                  File SettingController.php has 268 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * 2017 HiPay
                   *
                   * NOTICE OF LICENSE
                  Severity: Minor
                  Found in src/Controller/SettingController.php - About 2 hrs to fix

                    Method prepareAjaxRequest has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function prepareAjaxRequest($queryBuilder, $search, $custom)
                        {
                            if (!empty($search)) {
                                $queryBuilder->andWhere(
                                    $queryBuilder->expr()->orX(
                    Severity: Major
                    Found in src/Entity/LogVendorsRepository.php - About 2 hrs to fix

                      Vendor has 21 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Vendor implements VendorInterface, Timestampable
                      {
                          /**
                           * @var int
                           *
                      Severity: Minor
                      Found in src/Entity/Vendor.php - About 2 hrs to fix

                        LogOperations has 21 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class LogOperations implements LogOperationsInterface
                        {
                            /**
                             * @var int
                             *
                        Severity: Minor
                        Found in src/Entity/LogOperations.php - About 2 hrs to fix

                          Function createOptionValue has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  createOptionValue: function(element) {
                                      var $element = $(element);
                                      if ($element.is(':selected')) {
                                          $element.prop('selected', true);
                                      }
                          Severity: Major
                          Found in web/js/bootstrap-multiselect.js - About 2 hrs to fix

                            Function prepareAjaxRequest has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function prepareAjaxRequest($queryBuilder, $search, $custom)
                                {
                                    if (!empty($search)) {
                                        $queryBuilder->andWhere(
                                            $queryBuilder->expr()->orX(
                            Severity: Minor
                            Found in src/Entity/LogVendorsRepository.php - About 1 hr 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 generateSettingsForm has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function generateSettingsForm()
                                {
                            
                                    $default = array(
                                        'token' => $this->parameters->offsetGet('github.token'),
                            Severity: Minor
                            Found in src/Controller/SettingController.php - About 1 hr to fix

                              Method prepareAjaxData has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function prepareAjaxData($data)
                                  {
                                      foreach ($data as $key => $logRow) {
                                          $data[$key]['date'] = $logRow['date']->format('Y-m-d H:i:s');
                                          $data[$key]['statusWalletAccount'] = array(
                              Severity: Minor
                              Found in src/Controller/LogVendorController.php - About 1 hr to fix

                                Function dataprovider has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        dataprovider: function(dataprovider) {
                                
                                            var groupCounter = 0;
                                            var $select = this.$select.empty();
                                
                                
                                Severity: Minor
                                Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                                  Function refresh has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          refresh: function () {
                                              var inputs = {};
                                              $('li input', this.$ul).each(function() {
                                                inputs[$(this).val()] = $(this);
                                              });
                                  Severity: Minor
                                  Found in web/js/bootstrap-multiselect.js - About 1 hr to fix

                                    Function Multiselect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function Multiselect(select, options) {
                                    
                                            this.$select = $(select);
                                            this.options = this.mergeOptions($.extend({}, options, this.$select.data()));
                                    
                                    
                                    Severity: Minor
                                    Found in web/js/bootstrap-multiselect.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language