laravel/framework

View on GitHub

Showing 829 of 1,026 total issues

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

class HasManyThrough extends Relation
{
    use InteractsWithDictionary;

    /**
Severity: Major
Found in src/Illuminate/Database/Eloquent/Relations/HasManyThrough.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

        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 445 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

            UrlGenerator has 48 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

              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

                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

                  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

                    File Event.php has 426 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

                            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

                                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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language