iranianpep/code-jetter

View on GitHub

Showing 251 of 1,173 total issues

Method profileForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function profileForm()
    {
        $currentUser = (new AdminUser())->getLoggedIn();

        /**
Severity: Minor
Found in components/user/controllers/AdminUserController.php - About 1 hr to fix

    Method profileForm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function profileForm()
        {
            $currentUser = (new MemberUser())->getLoggedIn();
    
            /**
    Severity: Minor
    Found in components/user/controllers/MemberUserController.php - About 1 hr to fix

      Function hide has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Collapse.prototype.hide = function () {
          if (this.transitioning || !this.$element.hasClass('in')) return
      
          var startEvent = $.Event('hide.bs.collapse')
          this.$element.trigger(startEvent)
      Severity: Minor
      Found in public/scripts/bootstrap.js - About 1 hr to fix

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

          ScrollSpy.prototype.refresh = function () {
            var that          = this
            var offsetMethod  = 'offset'
            var offsetBase    = 0
        
        
        Severity: Minor
        Found in public/scripts/bootstrap.js - About 1 hr to fix

          Function next has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function next() {
                $active
                  .removeClass('active')
                  .find('> .dropdown-menu > .active')
                    .removeClass('active')
          Severity: Minor
          Found in public/scripts/bootstrap.js - About 1 hr to fix

            Method getAll has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    array $criteria = [],
                    array $fromColumns = [],
                    $order = null,
                    $start = 0,
                    $limit = 0,
            Severity: Major
            Found in core/BaseMapper.php - About 1 hr to fix

              Function login has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function login($key, $value, $password)
                  {
                      // determine which mapper should be called
                      $mapperName = $this->getMapperName();
              
              
              Severity: Minor
              Found in components/user/models/User.php - About 55 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 getOneByEmail has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getOneByEmail($email, $parentId = null, $status = null, $excludeArchived = true)
                  {
                      /*
                       * start validating
                       */
              Severity: Minor
              Found in components/user/mappers/MemberUserMapper.php - About 55 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 checkTokenIsValidByEmail has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function checkTokenIsValidByEmail($email, $token)
                  {
                      $output = new Output();
              
                      /**
              Severity: Minor
              Found in components/user/models/User.php - About 55 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 getOneByEmail has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getOneByEmail($email, $parentId = null, $status = null)
                  {
                      /**
                       * start validating.
                       */
              Severity: Minor
              Found in components/user/mappers/UserMapper.php - About 55 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 removeTablePrefixAndSuffix has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function removeTablePrefixAndSuffix($tableName = null, $tablePrefix = null, $tableSuffix = null)
                  {
                      if (empty(trim($tableName))) {
                          $tableName = $this->getTable();
                      }
              Severity: Minor
              Found in core/BaseMapper.php - About 55 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 generateRadioButtons has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function generateRadioButtons($options, $name = null, $checked = null, array $configs = [])
                  {
                      $html = '';
              
                      $type = 'radio';
              Severity: Minor
              Found in core/utility/HtmlUtility.php - About 55 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 validatePassword has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function validatePassword(array $args)
                  {
                      $output = new Output();
                      if (empty($args['toBeCheckedInput'])) {
                          $output->setSuccess(false);
              Severity: Minor
              Found in core/security/Validator.php - About 55 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 getStatesCities has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      array $criteria = [],
                      $fromColumns = null,
                      $order = null,
                      $start = 0,
                      $limit = 0,
              Severity: Major
              Found in components/geolocation/mappers/StateMapper.php - About 50 mins to fix

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

                        array $criteria,
                        array $inputs,
                        array $fieldsValues,
                        $limit = 0,
                        $extraDefinedInputs = [],
                Severity: Major
                Found in components/user/mappers/MemberUserMapper.php - About 50 mins to fix

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

                          array $criteria,
                          array $inputs,
                          array $fieldsValues,
                          $limit = 0,
                          $extraDefinedInputs = [],
                  Severity: Major
                  Found in components/user/mappers/MemberGroupMapper.php - About 50 mins to fix

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

                            array $criteria,
                            array $inputs,
                            array $fieldsValues,
                            $limit = 0,
                            $extraDefinedInputs = [],
                    Severity: Major
                    Found in components/user/mappers/UserMapper.php - About 50 mins to fix

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

                              array $criteria,
                              array $inputs,
                              array $fieldsValues,
                              $limit = 0,
                              $extraDefinedInputs = [],
                      Severity: Major
                      Found in core/ICrud.php - About 50 mins to fix

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

                                array $criteria,
                                array $inputs,
                                array $fieldsValues,
                                $limit = 0,
                                $extraDefinedInputs = [],
                        Severity: Major
                        Found in core/BaseMapper.php - About 50 mins to fix

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

                                  array $criteria = [],
                                  $order = '',
                                  $start = 0,
                                  $limit = 0,
                                  $returnTotalNo = false,
                          Severity: Minor
                          Found in components/user/mappers/MemberUserMapper.php - About 45 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language