laravel/framework

View on GitHub

Showing 864 of 1,073 total issues

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

    protected function models()
    {
        if (! empty($models = $this->option('model'))) {
            return collect($models)->filter(function ($model) {
                return class_exists($model);
Severity: Minor
Found in src/Illuminate/Database/Console/PruneCommand.php - About 1 hr to fix

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

        protected function get($name, ?array $config = null)
        {
            try {
                return $this->channels[$name] ?? with($this->resolve($name, $config), function ($logger) use ($name) {
                    $loggerWithContext = $this->tap(
    Severity: Minor
    Found in src/Illuminate/Log/LogManager.php - About 1 hr to fix

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

          protected function orderedLazyById($chunkSize = 1000, $column = null, $alias = null, $descending = false)
          {
              if ($chunkSize < 1) {
                  throw new InvalidArgumentException('The chunk size should be at least 1');
              }
      Severity: Minor
      Found in src/Illuminate/Database/Concerns/BuildsQueries.php - About 1 hr to fix

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

            public function run()
            {
                $this->hasExecuted = true;
        
                $mock = $this->mockConsoleOutput();
        Severity: Minor
        Found in src/Illuminate/Testing/PendingCommand.php - About 1 hr to fix

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

              public function whereBelongsTo($related, $relationshipName = null, $boolean = 'and')
              {
                  if (! $related instanceof Collection) {
                      $relatedCollection = $related->newCollection([$related]);
                  } else {
          Severity: Minor
          Found in src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php - About 1 hr to fix

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

                public function processForeignKeys($results)
                {
                    return array_map(function ($result) {
                        $result = (object) $result;
            
            
            Severity: Minor
            Found in src/Illuminate/Database/Query/Processors/PostgresProcessor.php - About 1 hr to fix

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

                  public function match(Request $request)
                  {
                      $matcher = new CompiledUrlMatcher(
                          $this->compiled, (new RequestContext)->fromRequest(
                              $trimmedRequest = $this->requestWithoutTrailingSlash($request)
              Severity: Minor
              Found in src/Illuminate/Routing/CompiledRouteCollection.php - About 1 hr to fix

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

                    public function add($jobs)
                    {
                        $count = 0;
                
                        $jobs = Collection::wrap($jobs)->map(function ($job) use (&$count) {
                Severity: Minor
                Found in src/Illuminate/Bus/Batch.php - About 1 hr to fix

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

                      protected function currentTags($chunkSize = 1000)
                      {
                          $connection = $this->connection();
                  
                          // Connections can have a global prefix...
                  Severity: Minor
                  Found in src/Illuminate/Cache/RedisStore.php - About 1 hr to fix

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

                        protected function promptForMissingArguments(InputInterface $input, OutputInterface $output)
                        {
                            $prompted = collect($this->getDefinition()->getArguments())
                                ->reject(fn (InputArgument $argument) => $argument->getName() === 'command')
                                ->filter(fn (InputArgument $argument) => $argument->isRequired() && match (true) {
                    Severity: Minor
                    Found in src/Illuminate/Console/Concerns/PromptsForMissingInput.php - About 1 hr to fix

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

                          public function handle()
                          {
                              $this->components->info(
                                  'Running scheduled tasks every minute.',
                                  $this->getLaravel()->isLocal() ? OutputInterface::VERBOSITY_NORMAL : OutputInterface::VERBOSITY_VERBOSE
                      Severity: Minor
                      Found in src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php - About 1 hr to fix

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

                            public function putMany(array $values, $seconds)
                            {
                                if (count($values) === 0) {
                                    return true;
                                }
                        Severity: Minor
                        Found in src/Illuminate/Cache/DynamoDbStore.php - About 1 hr to fix

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

                              protected function repeatEvents($events)
                              {
                                  $hasEnteredMaintenanceMode = false;
                          
                                  while (Date::now()->lte($this->startedAt->endOfMinute())) {
                          Severity: Minor
                          Found in src/Illuminate/Console/Scheduling/ScheduleRunCommand.php - About 1 hr to fix

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

                                public function handle()
                                {
                                    $this->gatherApplicationInformation();
                            
                                    collect(static::$data)
                            Severity: Minor
                            Found in src/Illuminate/Foundation/Console/AboutCommand.php - About 1 hr to fix

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

                                  public function handle()
                                  {
                                      $this->call('config:publish', ['name' => 'broadcasting']);
                              
                                      // Install channel routes file...
                              Severity: Minor
                              Found in src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php - About 1 hr to fix

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

                                    public static function isCallable($var, $syntaxOnly = false)
                                    {
                                        if (! is_array($var)) {
                                            return is_callable($var, $syntaxOnly);
                                        }
                                Severity: Minor
                                Found in src/Illuminate/Support/Reflector.php - About 1 hr to fix

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

                                      protected function getMessage($attribute, $rule)
                                      {
                                          $attributeWithPlaceholders = $attribute;
                                  
                                          $attribute = $this->replacePlaceholderInString($attribute);
                                  Severity: Minor
                                  Found in src/Illuminate/Validation/Concerns/FormatsMessages.php - About 1 hr to fix

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

                                        protected function display($class, $database, $table, $policy, $attributes, $relations, $events, $observers)
                                    Severity: Major
                                    Found in src/Illuminate/Database/Console/ShowModelCommand.php - About 1 hr to fix

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

                                          protected function displayCli($class, $database, $table, $policy, $attributes, $relations, $events, $observers)
                                      Severity: Major
                                      Found in src/Illuminate/Database/Console/ShowModelCommand.php - About 1 hr to fix

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

                                            protected function displayJson($class, $database, $table, $policy, $attributes, $relations, $events, $observers)
                                        Severity: Major
                                        Found in src/Illuminate/Database/Console/ShowModelCommand.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language