laravel/framework

View on GitHub

Showing 1,012 of 1,012 total issues

File BladeCompiler.php has 493 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace Illuminate\View\Compilers;

use Illuminate\Container\Container;
Severity: Minor
Found in src/Illuminate/View/Compilers/BladeCompiler.php - About 7 hrs to fix

    File ComponentTagCompiler.php has 487 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Illuminate\View\Compilers;
    
    use Illuminate\Container\Container;
    Severity: Minor
    Found in src/Illuminate/View/Compilers/ComponentTagCompiler.php - About 7 hrs to fix

      File helpers.php has 485 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      use Illuminate\Container\Container;
      use Illuminate\Contracts\Auth\Access\Gate;
      use Illuminate\Contracts\Auth\Factory as AuthFactory;
      Severity: Minor
      Found in src/Illuminate/Foundation/helpers.php - About 7 hrs to fix

        FilesystemAdapter has 53 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class FilesystemAdapter implements CloudFilesystemContract
        {
            use Conditionable;
            use Macroable {
                __call as macroCall;
        Severity: Major
        Found in src/Illuminate/Filesystem/FilesystemAdapter.php - About 7 hrs to fix

          File SqlServerGrammar.php has 477 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/SqlServerGrammar.php - About 7 hrs to fix

            File FilesystemAdapter.php has 476 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            namespace Illuminate\Filesystem;
            
            use Closure;
            Severity: Minor
            Found in src/Illuminate/Filesystem/FilesystemAdapter.php - About 7 hrs to fix

              File Arr.php has 472 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              namespace Illuminate\Support;
              
              use ArgumentCountError;
              Severity: Minor
              Found in src/Illuminate/Collections/Arr.php - About 7 hrs to fix

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

                abstract class Factory
                {
                    use Conditionable, ForwardsCalls, Macroable {
                        __call as macroCall;
                    }
                Severity: Minor
                Found in src/Illuminate/Database/Eloquent/Factories/Factory.php - About 7 hrs to fix

                  HasManyThrough has 50 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class HasManyThrough extends Relation
                  {
                      use InteractsWithDictionary;
                  
                      /**
                  Severity: Minor
                  Found in src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php - About 7 hrs to fix

                    Function data_set has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                    Open

                        function data_set(&$target, $key, $value, $overwrite = true)
                        {
                            $segments = is_array($key) ? $key : explode('.', $key);
                    
                            if (($segment = array_shift($segments)) === '*') {
                    Severity: Minor
                    Found in src/Illuminate/Collections/helpers.php - About 6 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    File Factory.php has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

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

                      BladeCompiler has 48 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class BladeCompiler extends Compiler implements CompilerInterface
                      {
                          use Concerns\CompilesAuthorizations,
                              Concerns\CompilesClasses,
                              Concerns\CompilesComments,
                      Severity: Minor
                      Found in src/Illuminate/View/Compilers/BladeCompiler.php - About 6 hrs to fix

                        Handler has 48 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Handler implements ExceptionHandlerContract
                        {
                            use ReflectsClosures;
                        
                            /**
                        Severity: Minor
                        Found in src/Illuminate/Foundation/Exceptions/Handler.php - About 6 hrs to fix

                          UrlGenerator has 47 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class UrlGenerator implements UrlGeneratorContract
                          {
                              use InteractsWithTime, Macroable;
                          
                              /**
                          Severity: Minor
                          Found in src/Illuminate/Routing/UrlGenerator.php - About 6 hrs to fix

                            Filesystem has 46 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Filesystem
                            {
                                use Conditionable, Macroable;
                            
                                /**
                            Severity: Minor
                            Found in src/Illuminate/Filesystem/Filesystem.php - About 6 hrs to fix

                              BusFake has 46 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class BusFake implements Fake, QueueingDispatcher
                              {
                                  use ReflectsClosures;
                              
                                  /**
                              Severity: Minor
                              Found in src/Illuminate/Support/Testing/Fakes/BusFake.php - About 6 hrs to fix

                                File Event.php has 425 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                
                                namespace Illuminate\Console\Scheduling;
                                
                                use Closure;
                                Severity: Minor
                                Found in src/Illuminate/Console/Scheduling/Event.php - About 6 hrs to fix

                                  LogManager has 45 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class LogManager implements LoggerInterface
                                  {
                                      use ParsesLogConfiguration;
                                  
                                      /**
                                  Severity: Minor
                                  Found in src/Illuminate/Log/LogManager.php - About 6 hrs to fix

                                    Arr has 44 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class Arr
                                    {
                                        use Macroable;
                                    
                                        /**
                                    Severity: Minor
                                    Found in src/Illuminate/Collections/Arr.php - About 6 hrs to fix

                                      File BusFake.php has 414 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      <?php
                                      
                                      namespace Illuminate\Support\Testing\Fakes;
                                      
                                      use Closure;
                                      Severity: Minor
                                      Found in src/Illuminate/Support/Testing/Fakes/BusFake.php - About 5 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language