laravel/framework

View on GitHub

Showing 864 of 1,073 total issues

Method compileLegacyRenameColumn has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function compileLegacyRenameColumn(Blueprint $blueprint, Fluent $command, Connection $connection)
    {
        $column = collect($connection->getSchemaBuilder()->getColumns($blueprint->getTable()))
            ->firstWhere('name', $command->from);

Severity: Minor
Found in src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php - About 1 hr to fix

    Method flexible has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function flexible($key, $ttl, $callback, $lock = null)
        {
            [
                $key => $value,
                "illuminate:cache:flexible:created:{$key}" => $created,
    Severity: Minor
    Found in src/Illuminate/Cache/Repository.php - About 1 hr to fix

      Method handle has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function handle()
          {
              $environmentFile = $this->option('env')
                  ? base_path('.env').'.'.$this->option('env')
                  : base_path('.env');
      Severity: Minor
      Found in src/Illuminate/Foundation/Console/ServeCommand.php - About 1 hr to fix

        Method sendNow has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function sendNow($notifiables, $notification, ?array $channels = null)
            {
                if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
                    $notifiables = [$notifiables];
                }
        Severity: Minor
        Found in src/Illuminate/Support/Testing/Fakes/NotificationFake.php - About 1 hr to fix

          Method createMonologDriver has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function createMonologDriver(array $config)
              {
                  if (! is_a($config['handler'], HandlerInterface::class, true)) {
                      throw new InvalidArgumentException(
                          $config['handler'].' must be an instance of '.HandlerInterface::class
          Severity: Minor
          Found in src/Illuminate/Log/LogManager.php - About 1 hr to fix

            Method assertJsonValidationErrors has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function assertJsonValidationErrors($errors, $responseKey = 'errors')
                {
                    $errors = Arr::wrap($errors);
            
                    PHPUnit::withResponse($this)->assertNotEmpty($errors, 'No validation errors were provided.');
            Severity: Minor
            Found in src/Illuminate/Testing/TestResponse.php - About 1 hr to fix

              Method groupBy has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function groupBy($groupBy, $preserveKeys = false)
                  {
                      if (! $this->useAsCallable($groupBy) && is_array($groupBy)) {
                          $nextGroups = $groupBy;
              
              
              Severity: Minor
              Found in src/Illuminate/Collections/Collection.php - About 1 hr to fix

                Method morphToMany has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function morphToMany($related, $name, $table = null, $foreignPivotKey = null,
                                                $relatedPivotKey = null, $parentKey = null,
                                                $relatedKey = null, $relation = null, $inverse = false)
                Severity: Major
                Found in src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php - About 1 hr to fix

                  Method make has 9 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);
                  Severity: Major
                  Found in src/Illuminate/Contracts/Cookie/Factory.php - About 1 hr to fix

                    Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function __construct(Address|string|null $from = null, $to = [], $cc = [], $bcc = [], $replyTo = [], ?string $subject = null, array $tags = [], array $metadata = [], Closure|array $using = [])
                    Severity: Major
                    Found in src/Illuminate/Mail/Mailables/Envelope.php - About 1 hr to fix

                      Method make has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
                      Severity: Major
                      Found in src/Illuminate/Cookie/CookieJar.php - About 1 hr to fix

                        Method withRouting has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            public function withRouting(?Closure $using = null,
                                array|string|null $web = null,
                                array|string|null $api = null,
                                ?string $commands = null,
                                ?string $channels = null,
                        Severity: Major
                        Found in src/Illuminate/Foundation/Configuration/ApplicationBuilder.php - About 1 hr to fix

                          Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public function __construct($name = 'default', $environment = null, $backoff = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 1, $force = false, $rest = 0)
                          Severity: Major
                          Found in src/Illuminate/Queue/ListenerOptions.php - About 1 hr to fix

                            Method cookie has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
                            Severity: Major
                            Found in src/Illuminate/Foundation/helpers.php - About 1 hr to fix

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

                                  public function has($key, $length = null, ?Closure $callback = null): self
                                  {
                                      $prop = $this->prop();
                              
                                      if (is_int($key) && is_null($length)) {
                              Severity: Minor
                              Found in src/Illuminate/Testing/Fluent/Concerns/Has.php - About 1 hr to fix

                                Method componentClass has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function componentClass(string $component)
                                    {
                                        $viewFactory = Container::getInstance()->make(Factory::class);
                                
                                        if (isset($this->aliases[$component])) {
                                Severity: Minor
                                Found in src/Illuminate/View/Compilers/ComponentTagCompiler.php - About 1 hr to fix

                                  Method whereNot has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function whereNot(string $key, $expected): self
                                      {
                                          $this->has($key);
                                  
                                          $actual = $this->prop($key);
                                  Severity: Minor
                                  Found in src/Illuminate/Testing/Fluent/Concerns/Matching.php - About 1 hr to fix

                                    Method hydrate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function hydrate($context)
                                        {
                                            $unserialize = function ($value, $key, $hidden) {
                                                try {
                                                    return tap($this->getRestoredPropertyValue(unserialize($value)), function ($value) {
                                    Severity: Minor
                                    Found in src/Illuminate/Log/Context/Repository.php - About 1 hr to fix

                                      Method handle has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function handle()
                                          {
                                              return $this->migrator->usingConnection($this->option('database'), function () {
                                                  if (! $this->migrator->repositoryExists()) {
                                                      $this->components->error('Migration table not found.');
                                      Severity: Minor
                                      Found in src/Illuminate/Database/Console/Migrations/StatusCommand.php - About 1 hr to fix

                                        Method __call has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function __call($method, $parameters)
                                            {
                                                if (static::hasMacro($method)) {
                                                    return $this->macroCall($method, $parameters);
                                                }
                                        Severity: Minor
                                        Found in src/Illuminate/Database/Eloquent/Factories/Factory.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language