laravel/framework

View on GitHub

Showing 1,012 of 1,012 total issues

SQLiteGrammar has 72 functions (exceeds 20 allowed). Consider refactoring.
Open

class SQLiteGrammar extends Grammar
{
    /**
     * The possible column modifiers.
     *
Severity: Major
Found in src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php - About 1 day to fix

    File MySqlGrammar.php has 603 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Illuminate\Database\Schema\Grammars;
    
    use Illuminate\Database\Connection;
    Severity: Major
    Found in src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php - About 1 day to fix

      File Route.php has 597 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      namespace Illuminate\Routing;
      
      use Closure;
      Severity: Major
      Found in src/Illuminate/Routing/Route.php - About 1 day to fix

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

        <?php
        
        namespace Illuminate\Testing\Constraints;
        
        use Illuminate\Database\Connection;
        src/Illuminate/Testing/Constraints/SoftDeletedInDatabase.php on lines 1..117

        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 290.

        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\Testing\Constraints;
        
        use Illuminate\Database\Connection;
        Severity: Major
        Found in src/Illuminate/Testing/Constraints/SoftDeletedInDatabase.php and 1 other location - About 1 day to fix
        src/Illuminate/Testing/Constraints/NotSoftDeletedInDatabase.php on lines 1..115

        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 290.

        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 PostgresGrammar.php has 557 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace Illuminate\Database\Schema\Grammars;
        
        use Illuminate\Database\Connection;
        Severity: Major
        Found in src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php - About 1 day to fix

          File ArtisanServiceProvider.php has 556 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          namespace Illuminate\Foundation\Providers;
          
          use Illuminate\Auth\Console\ClearResetsCommand;
          Severity: Major
          Found in src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php - About 1 day to fix

            Event has 60 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Event
            {
                use Macroable, ManagesFrequencies, ReflectsClosures;
            
                /**
            Severity: Major
            Found in src/Illuminate/Console/Scheduling/Event.php - About 1 day to fix

              File Handler.php has 525 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              namespace Illuminate\Foundation\Exceptions;
              
              use Closure;
              Severity: Major
              Found in src/Illuminate/Foundation/Exceptions/Handler.php - About 1 day to fix

                File Stringable.php has 525 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                
                namespace Illuminate\Support;
                
                use ArrayAccess;
                Severity: Major
                Found in src/Illuminate/Support/Stringable.php - About 1 day to fix

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

                  <?php
                  
                  use Illuminate\Cache\Repository;
                  
                  use function PHPStan\Testing\assertType;
                  Severity: Major
                  Found in types/Cache/Repository.php and 1 other location - About 1 day to fix
                  types/Contracts/Cache/Repository.php on lines 1..29

                  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 252.

                  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
                  
                  use Illuminate\Contracts\Cache\Repository;
                  
                  use function PHPStan\Testing\assertType;
                  Severity: Major
                  Found in types/Contracts/Cache/Repository.php and 1 other location - About 1 day to fix
                  types/Cache/Repository.php on lines 1..29

                  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 252.

                  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

                          if (is_null($value)) {
                              PHPUnit::assertTrue(Arr::has($this->original->gatherData(), $key));
                          } elseif ($value instanceof Closure) {
                              PHPUnit::assertTrue($value(Arr::get($this->original->gatherData(), $key)));
                          } elseif ($value instanceof Model) {
                  Severity: Major
                  Found in src/Illuminate/Testing/TestResponse.php and 1 other location - About 1 day to fix
                  src/Illuminate/Testing/TestView.php on lines 58..73

                  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 248.

                  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

                          if (is_null($value)) {
                              PHPUnit::assertTrue(Arr::has($this->view->gatherData(), $key));
                          } elseif ($value instanceof Closure) {
                              PHPUnit::assertTrue($value(Arr::get($this->view->gatherData(), $key)));
                          } elseif ($value instanceof Model) {
                  Severity: Major
                  Found in src/Illuminate/Testing/TestView.php and 1 other location - About 1 day to fix
                  src/Illuminate/Testing/TestResponse.php on lines 1070..1085

                  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 248.

                  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 EnumeratesValues.php has 501 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  namespace Illuminate\Support\Traits;
                  
                  use CachingIterator;
                  Severity: Major
                  Found in src/Illuminate/Collections/Traits/EnumeratesValues.php - About 1 day to fix

                    AbstractPaginator has 56 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    abstract class AbstractPaginator implements Htmlable, Stringable
                    {
                        use ForwardsCalls, Tappable;
                    
                        /**
                    Severity: Major
                    Found in src/Illuminate/Pagination/AbstractPaginator.php - About 1 day to fix

                      Request has 56 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Request extends SymfonyRequest implements Arrayable, ArrayAccess
                      {
                          use Concerns\CanBePrecognitive,
                              Concerns\InteractsWithContentTypes,
                              Concerns\InteractsWithFlashData,
                      Severity: Major
                      Found in src/Illuminate/Http/Request.php - About 1 day to fix

                        File SQLiteGrammar.php has 500 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        namespace Illuminate\Database\Schema\Grammars;
                        
                        use Illuminate\Database\Connection;
                        Severity: Minor
                        Found in src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php - About 1 day to fix

                          Store has 56 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Store implements Session
                          {
                              use Macroable;
                          
                              /**
                          Severity: Major
                          Found in src/Illuminate/Session/Store.php - About 1 day to fix

                            ArtisanServiceProvider has 56 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class ArtisanServiceProvider extends ServiceProvider implements DeferrableProvider
                            {
                                /**
                                 * The commands to be registered.
                                 *
                            Severity: Major
                            Found in src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language