nabbar/SwaggerValidator-PHP

View on GitHub

Showing 188 of 604 total issues

Avoid too many return statements within this method.
Open

                return $context->setDataPath($key)->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_TOOMANY, 'Property "' . $key . '" is not awaiting in the value object !', __METHOD__, __LINE__);
Severity: Major
Found in src/DataType/TypeObject.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return $context->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_SWAGGER_ERROR, 'Cannot build model for key "' . $key . '" in Combined Object !', __METHOD__, __LINE__);
    Severity: Major
    Found in src/DataType/TypeCombined.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return $context->setDataCheck('minimum')->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_DATASIZE, null, __METHOD__, __LINE__);
      Severity: Major
      Found in src/DataType/TypeNumber.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return $this->validateOneOf($context, $valueParams);
        Severity: Major
        Found in src/DataType/TypeCombined.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return $context->setDataCheck('pattern')->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_PATTERN, null, __METHOD__, __LINE__);
          Severity: Major
          Found in src/DataType/TypeInteger.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return true;
            Severity: Major
            Found in src/DataType/TypeInteger.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return $context->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_DATATYPE, 'The format does not match with registred patterns', __METHOD__, __LINE__);
              Severity: Major
              Found in src/DataType/TypeInteger.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return $context->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_SWAGGER_ERROR, 'Combined Object Type is not well defined !', __METHOD__, __LINE__);
                Severity: Major
                Found in src/DataType/TypeCombined.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return false;
                  Severity: Major
                  Found in src/DataType/TypeNumber.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                            return \SwaggerValidator\Common\Factory::getInstance()->OAuth2AccessCodeSecurity;
                    Severity: Major
                    Found in src/Common/FactorySwagger.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return true;
                      Severity: Major
                      Found in src/DataType/TypeObject.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return false;
                        Severity: Major
                        Found in src/DataType/TypeInteger.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return true;
                          Severity: Major
                          Found in src/DataType/TypeInteger.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return '2001:' . base_convert(random_int(0, pow(2, 16) - 1), 10, 16) . ':' . base_convert(random_int(0, pow(2, 16) - 1), 10, 16) . ':' . base_convert(random_int(0, pow(2, 16) - 1), 10, 16) . ':' . base_convert(random_int(0, pow(2, 16) - 1), 10, 16) . ':' . base_convert(random_int(0, pow(2, 16) - 1), 10, 16) . '::';
                            Severity: Major
                            Found in src/DataType/TypeString.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return true;
                              Severity: Major
                              Found in src/DataType/TypeString.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return $context->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_DATATYPE, 'The format does not match with registred patterns', __METHOD__, __LINE__);
                                Severity: Major
                                Found in src/DataType/TypeString.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return long2ip(random_int(167772161, 4210752250));
                                  Severity: Major
                                  Found in src/DataType/TypeString.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return $value;
                                    Severity: Major
                                    Found in src/DataType/TypeCommon.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                  return $context->setDataCheck('pattern')->setValidationError(\SwaggerValidator\Common\Context::VALIDATION_TYPE_PATTERN, null, __METHOD__, __LINE__);
                                      Severity: Major
                                      Found in src/DataType/TypeString.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                return (bool) preg_match($pattern, $valueParams);
                                        Severity: Major
                                        Found in src/DataType/TypeString.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language