e107inc/e107

View on GitHub
e107_handlers/validator_class.php

Summary

Maintainability
D
2 days
Test Coverage
F
22%

Avoid deeply nested control flow statements.
Open

                                        if ('!' == substr($disTrim, -1) && $v == str_replace('!', '', $disallow))
                                        {    // Exact match search (noticed with exclamation mark in the end of the word)
                                            $errMsg = ERR_DISALLOWED_TEXT_EXACT_MATCH;
                                        }
                                        elseif (stripos($v, $disTrim) !== false)
Severity: Major
Found in e107_handlers/validator_class.php - About 45 mins to fix

    Avoid too many return statements within this method.
    Open

                        return false;
    Severity: Major
    Found in e107_handlers/validator_class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return false;
      Severity: Major
      Found in e107_handlers/validator_class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return false;
        Severity: Major
        Found in e107_handlers/validator_class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return false;
          Severity: Major
          Found in e107_handlers/validator_class.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return false;
            Severity: Major
            Found in e107_handlers/validator_class.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                      return false;
              Severity: Major
              Found in e107_handlers/validator_class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    return false;
                Severity: Major
                Found in e107_handlers/validator_class.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return false;
                  Severity: Major
                  Found in e107_handlers/validator_class.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return true;
                    Severity: Major
                    Found in e107_handlers/validator_class.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return false;
                      Severity: Major
                      Found in e107_handlers/validator_class.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                        return true;
                        Severity: Major
                        Found in e107_handlers/validator_class.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                              return false;
                          Severity: Major
                          Found in e107_handlers/validator_class.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                return false;
                            Severity: Major
                            Found in e107_handlers/validator_class.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return true;
                              Severity: Major
                              Found in e107_handlers/validator_class.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                return true;
                                Severity: Major
                                Found in e107_handlers/validator_class.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                          return false;
                                  Severity: Major
                                  Found in e107_handlers/validator_class.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                    return true;
                                    Severity: Major
                                    Found in e107_handlers/validator_class.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                          return false;
                                      Severity: Major
                                      Found in e107_handlers/validator_class.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                            return false;
                                        Severity: Major
                                        Found in e107_handlers/validator_class.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                              return false;
                                          Severity: Major
                                          Found in e107_handlers/validator_class.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                                return false;
                                            Severity: Major
                                            Found in e107_handlers/validator_class.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                                      return false;
                                              Severity: Major
                                              Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                        return false;
                                                Severity: Major
                                                Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                          return false;
                                                  Severity: Major
                                                  Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                    return false;
                                                    Severity: Major
                                                    Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                      return true;
                                                      Severity: Major
                                                      Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                        return true;
                                                        Severity: Major
                                                        Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                              return false;
                                                          Severity: Major
                                                          Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                return false;
                                                            Severity: Major
                                                            Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  return false;
                                                              Severity: Major
                                                              Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                return true;
                                                                Severity: Major
                                                                Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                  return true;
                                                                  Severity: Major
                                                                  Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                        return false;
                                                                    Severity: Major
                                                                    Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                          return false;
                                                                      Severity: Major
                                                                      Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                            return false;
                                                                        Severity: Major
                                                                        Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                              return false;
                                                                          Severity: Major
                                                                          Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                                return false;
                                                                            Severity: Major
                                                                            Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                              return true;
                                                                              Severity: Major
                                                                              Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                return true;
                                                                                Severity: Major
                                                                                Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                          return false;
                                                                                  Severity: Major
                                                                                  Found in e107_handlers/validator_class.php - About 30 mins to fix

                                                                                    Saw possibly unextractable annotation for a fragment of comment '* @param array [optional] $optrules optional validation rules': after array, did not see an element name (will guess based on comment order)
                                                                                    Open

                                                                                         * @param array [optional] $optrules optional validation rules
                                                                                    Severity: Info
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Argument #2 of this call to \strpos is typically a literal or constant but isn't, but argument #1 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
                                                                                    Open

                                                                                                                        if (strpos('-upload-', $value) === 0)
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Variable $targetData was undeclared, but array fields are being added to it.
                                                                                    Open

                                                                                                    $targetData['errors'][$f] = ERR_MISSING_VALUE;
                                                                                    Severity: Info
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    When fetching an array index from a value of type array|array{0:'dbClean',1:'toDB'|mixed}, found an array index of type 'srcName', but expected the index to be of type int
                                                                                    Open

                                                                                                $src = varset($defs['srcName'], $dest);                // Set source field name
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Suspicious array access to ?mixed
                                                                                    Open

                                                                                                    $curLine = str_replace('%x', $niceNames[$f]['niceName'], $curLine);
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    When fetching an array index from a value of type array|array{0:'dbClean',1:'toDB'|mixed}, found an array index of type 'fieldOptional', but expected the index to be of type int
                                                                                    Open

                                                                                                        if (!vartrue($defs['fieldOptional']))
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    null= passed to foreach instead of array
                                                                                    Open

                                                                                            foreach ($targetData['data'] as $f => $v)
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Saw possibly unextractable annotation for a fragment of comment '* @param string [optional] $message_stack [optional] eMessage handler namespace': after string, did not see an element name (will guess based on comment order)
                                                                                    Open

                                                                                         * @param string [optional] $message_stack [optional] eMessage handler namespace
                                                                                    Severity: Info
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Default value for string $err_code can't be int
                                                                                    Open

                                                                                        function addValidateMessage($field_title, $err_code = 0, $err_message = '', $custom = '')
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Saw possibly unextractable annotation for a fragment of comment '* @param array [optional] $rules validation rules': after array, did not see an element name (will guess based on comment order)
                                                                                    Open

                                                                                         * @param array [optional] $rules validation rules
                                                                                    Severity: Info
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    Argument 4 (noWhere) is array{value:mixed,userID:int} but \e_db::select() takes bool|false defined at /code/e107_handlers/e_db_interface.php:265
                                                                                    Open

                                                                                                                                'value' => $v,
                                                                                    Severity: Minor
                                                                                    Found in e107_handlers/validator_class.php by phan

                                                                                    There are no issues that match your filters.

                                                                                    Category
                                                                                    Status