laravel/framework

View on GitHub

Showing 864 of 1,073 total issues

Avoid too many return statements within this method.
Open

        return $condition == $number ? $value : null;
Severity: Major
Found in src/Illuminate/Translation/MessageSelector.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2);
    Severity: Major
    Found in src/Illuminate/Translation/MessageSelector.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return 0;
      Severity: Major
      Found in src/Illuminate/Translation/MessageSelector.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return ($number == 0) ? 0 : (($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5))));
        Severity: Major
        Found in src/Illuminate/Translation/MessageSelector.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2);
          Severity: Major
          Found in src/Illuminate/Translation/MessageSelector.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3));
            Severity: Major
            Found in src/Illuminate/Translation/MessageSelector.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return $this->toBase()->{$method}(...$parameters);
              Severity: Major
              Found in src/Illuminate/Database/Eloquent/Builder.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return false;
                Severity: Major
                Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          return is_numeric($attribute) && is_numeric($original)
                              && strcmp((string) $attribute, (string) $original) === 0;
                  Severity: Major
                  Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return $this;
                    Severity: Major
                    Found in src/Illuminate/Database/Query/Builder.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return $this->asTimestamp($value);
                      Severity: Major
                      Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return $this->getClassCastableAttributeValue($key, $value);
                        Severity: Major
                        Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return false;
                          Severity: Major
                          Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return new BaseCollection($this->fromJson($value));
                            Severity: Major
                            Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return $this;
                              Severity: Major
                              Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return abs($this->castAttribute($key, $attribute) - $this->castAttribute($key, $original)) < PHP_FLOAT_EPSILON * 4;
                                Severity: Major
                                Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return $this->fromEncryptedString($attribute) === $this->fromEncryptedString($original);
                                  Severity: Major
                                  Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                return $this->whereNull($column, $boolean, $operator !== '=');
                                    Severity: Major
                                    Found in src/Illuminate/Database/Query/Builder.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return $date ?: Date::parse($value);
                                      Severity: Major
                                      Found in src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                    return $this->whereSub($column, $operator, $value, $boolean);
                                        Severity: Major
                                        Found in src/Illuminate/Database/Query/Builder.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language