iranianpep/code-jetter

View on GitHub

Showing 251 of 1,173 total issues

Function show has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Modal.prototype.show = function (_relatedTarget) {
    var that = this
    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })

    this.$element.trigger(e)
Severity: Minor
Found in public/scripts/bootstrap.js - About 1 hr to fix

    Method getChildren has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getChildren(
            array $criteria = [],
            $order = '',
            $start = 0,
            $limit = 0,
    Severity: Minor
    Found in components/user/mappers/MemberUserMapper.php - About 1 hr to fix

      Function backdrop has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Modal.prototype.backdrop = function (callback) {
          var that = this
          var animate = this.$element.hasClass('fade') ? 'fade' : ''
      
          if (this.isShown && this.options.backdrop) {
      Severity: Minor
      Found in public/scripts/bootstrap.js - About 1 hr to fix

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

          Tab.prototype.activate = function (element, container, callback) {
            var $active    = container.find('> .active')
            var transition = callback
              && $.support.transition
              && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
        Severity: Minor
        Found in public/scripts/bootstrap.js - About 1 hr to fix

          Method batchDeleteGroup has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function batchDeleteGroup()
              {
                  $inputs = (new Request('POST'))->getInputs();
          
                  /**
          Severity: Minor
          Found in components/user/controllers/MemberGroupController.php - About 1 hr to fix

            Method batchDeleteMember has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function batchDeleteMember()
                {
                    $inputs = (new Request('POST'))->getInputs();
            
                    /**
            Severity: Minor
            Found in components/user/controllers/AdminUserController.php - About 1 hr to fix

              Method safeBatchDeleteMessage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function safeBatchDeleteMessage()
                  {
                      $inputs = (new Request('POST'))->getInputs();
              
                      /**
              Severity: Minor
              Found in components/contact/controllers/ContactController.php - About 1 hr to fix

                Method batchDeleteMessage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function batchDeleteMessage()
                    {
                        $inputs = (new Request('POST'))->getInputs();
                
                        /**
                Severity: Minor
                Found in components/contact/controllers/ContactController.php - About 1 hr to fix

                  Method getOneByUsername has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getOneByUsername($username, $status = null, $excludeArchived = true)
                      {
                          /**
                           * start validating.
                           */
                  Severity: Minor
                  Found in components/user/mappers/UserMapper.php - About 1 hr to fix

                    Method getOneByName has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getOneByName($name, $status = null, $excludeArchived = true)
                        {
                            /**
                             * Start validating.
                             */
                    Severity: Minor
                    Found in components/user/mappers/GroupMapper.php - About 1 hr to fix

                      Method getFieldsValues has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getFieldsValues(array $inputs, array $definedInputs, $case, array $columnsWhitelist = [])
                          {
                              $fieldsValues = [];
                              if (!empty($definedInputs)) {
                                  foreach ($definedInputs as $definedInput) {
                      Severity: Minor
                      Found in core/utility/InputUtility.php - About 1 hr to fix

                        Function show has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          Collapse.prototype.show = function () {
                            if (this.transitioning || this.$element.hasClass('in')) return
                        
                            var activesData
                            var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
                        Severity: Minor
                        Found in public/scripts/bootstrap.js - About 1 hr to fix

                          Function arrayComparison has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function arrayComparison(array $oldArray, array $newArray)
                              {
                                  $toBeDeleted = [];
                                  $toBeAdded = [];
                          
                          
                          Severity: Minor
                          Found in core/utility/ArrayUtility.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

                          Function send has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function send($to, $subject, $message)
                              {
                                  if (empty($to)) {
                                      throw new \Exception('Recipient for sending email cannot be empty');
                                  }
                          Severity: Minor
                          Found in core/Mailer.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

                          Function generateDropDownList has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function generateDropDownList($options, $name = null, $selected = null, array $configs = [])
                              {
                                  if (empty($options)) {
                                      return '';
                                  }
                          Severity: Minor
                          Found in core/utility/HtmlUtility.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

                          Function make has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function make(Page $page, array $templates, $masterTemplate = null, $formHandler = null)
                              {
                                  // set master template
                                  if ($masterTemplate === null) {
                                      $this->getMaster()->setTemplateName($this->getConfig()->get('defaultMasterTemplate'));
                          Severity: Minor
                          Found in core/View.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

                          Function generateCheckboxes has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function generateCheckboxes($options, $name = null, $checked = null, array $configs = [])
                              {
                                  $html = '';
                          
                                  $name = ($name !== null) ? " name='{$name}'" : '';
                          Severity: Minor
                          Found in core/utility/HtmlUtility.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

                          Function getServer has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function getServer($key)
                              {
                                  switch ($key) {
                                      case 'SERVER_NAME':
                                          $info = filter_input(INPUT_SERVER, 'SERVER_NAME', FILTER_SANITIZE_STRING);
                          Severity: Minor
                          Found in core/io/Request.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

                          Function success has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      success: function(response) {
                                          // if redirectTo is specified
                                          if (response.redirectTo !== undefined && response.redirectTo !== null) {
                                              window.location.href = response.redirectTo;
                                          }
                          Severity: Minor
                          Found in public/scripts/script.js - About 1 hr to fix

                            Method generateDropDownList has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function generateDropDownList($options, $name = null, $selected = null, array $configs = [])
                                {
                                    if (empty($options)) {
                                        return '';
                                    }
                            Severity: Minor
                            Found in core/utility/HtmlUtility.php - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language