laravel/framework

View on GitHub

Showing 1,026 of 1,026 total issues

File QueriesRelationships.php has 411 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace Illuminate\Database\Eloquent\Concerns;

use BadMethodCallException;
Severity: Minor
Found in src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php - About 5 hrs to fix

    AbstractCursorPaginator has 43 functions (exceeds 20 allowed). Consider refactoring.
    Open

    abstract class AbstractCursorPaginator implements Htmlable, Stringable
    {
        use ForwardsCalls, Tappable;
    
        /**
    Severity: Minor
    Found in src/Illuminate/Pagination/AbstractCursorPaginator.php - About 5 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      <?php
      
      namespace Illuminate\Queue\Console;
      
      use Illuminate\Console\MigrationGeneratorCommand;
      Severity: Major
      Found in src/Illuminate/Queue/Console/FailedTableCommand.php and 1 other location - About 5 hrs to fix
      src/Illuminate/Queue/Console/TableCommand.php on lines 1..77

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 200.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      <?php
      
      namespace Illuminate\Queue\Console;
      
      use Illuminate\Console\MigrationGeneratorCommand;
      Severity: Major
      Found in src/Illuminate/Queue/Console/TableCommand.php and 1 other location - About 5 hrs to fix
      src/Illuminate/Queue/Console/FailedTableCommand.php on lines 1..77

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 200.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      File Gate.php has 407 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace Illuminate\Auth\Access;
      
      use Closure;
      Severity: Minor
      Found in src/Illuminate/Auth/Access/Gate.php - About 5 hrs to fix

        Gate has 42 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Gate implements GateContract
        {
            use HandlesAuthorization;
        
            /**
        Severity: Minor
        Found in src/Illuminate/Auth/Access/Gate.php - About 5 hrs to fix

          Repository has 42 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Repository implements ArrayAccess, CacheContract
          {
              use InteractsWithTime, Macroable {
                  __call as macroCall;
              }
          Severity: Minor
          Found in src/Illuminate/Cache/Repository.php - About 5 hrs to fix

            File HasManyThrough.php has 402 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            namespace Illuminate\Database\Eloquent\Relations;
            
            use Closure;
            Severity: Minor
            Found in src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php - About 5 hrs to fix

              File Worker.php has 401 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              namespace Illuminate\Queue;
              
              use Illuminate\Contracts\Cache\Repository as CacheContract;
              Severity: Minor
              Found in src/Illuminate/Queue/Worker.php - About 5 hrs to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    public function increment($key, $value = 1)
                    {
                        try {
                            $response = $this->dynamo->updateItem([
                                'TableName' => $this->table,
                Severity: Major
                Found in src/Illuminate/Cache/DynamoDbStore.php and 1 other location - About 5 hrs to fix
                src/Illuminate/Cache/DynamoDbStore.php on lines 355..391

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 195.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    public function decrement($key, $value = 1)
                    {
                        try {
                            $response = $this->dynamo->updateItem([
                                'TableName' => $this->table,
                Severity: Major
                Found in src/Illuminate/Cache/DynamoDbStore.php and 1 other location - About 5 hrs to fix
                src/Illuminate/Cache/DynamoDbStore.php on lines 310..346

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 195.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                <?php
                
                namespace Illuminate\Validation\Rules;
                
                use BackedEnum;
                Severity: Major
                Found in src/Illuminate/Validation/Rules/In.php and 1 other location - About 5 hrs to fix
                src/Illuminate/Validation/Rules/NotIn.php on lines 1..60

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 194.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                <?php
                
                namespace Illuminate\Validation\Rules;
                
                use BackedEnum;
                Severity: Major
                Found in src/Illuminate/Validation/Rules/NotIn.php and 1 other location - About 5 hrs to fix
                src/Illuminate/Validation/Rules/In.php on lines 1..62

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 194.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Builder has 41 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class Builder
                {
                    use Macroable;
                
                    /**
                Severity: Minor
                Found in src/Illuminate/Database/Schema/Builder.php - About 5 hrs to fix

                  File Dispatcher.php has 389 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  namespace Illuminate\Events;
                  
                  use Closure;
                  Severity: Minor
                  Found in src/Illuminate/Events/Dispatcher.php - About 5 hrs to fix

                    Worker has 40 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Worker
                    {
                        use DetectsLostConnections;
                    
                        const EXIT_SUCCESS = 0;
                    Severity: Minor
                    Found in src/Illuminate/Queue/Worker.php - About 5 hrs to fix

                      Dispatcher has 39 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Dispatcher implements DispatcherContract
                      {
                          use Macroable, ReflectsClosures;
                      
                          /**
                      Severity: Minor
                      Found in src/Illuminate/Events/Dispatcher.php - About 5 hrs to fix

                        File LogManager.php has 375 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        namespace Illuminate\Log;
                        
                        use Closure;
                        Severity: Minor
                        Found in src/Illuminate/Log/LogManager.php - About 5 hrs to fix

                          Factory has 37 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Factory implements FactoryContract
                          {
                              use Macroable,
                                  Concerns\ManagesComponents,
                                  Concerns\ManagesEvents,
                          Severity: Minor
                          Found in src/Illuminate/View/Factory.php - About 4 hrs to fix

                            PostgresGrammar has 37 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class PostgresGrammar extends Grammar
                            {
                                /**
                                 * All of the available clause operators.
                                 *
                            Severity: Minor
                            Found in src/Illuminate/Database/Query/Grammars/PostgresGrammar.php - About 4 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language