laravel/framework

View on GitHub

Showing 838 of 1,045 total issues

QueueFake has 34 functions (exceeds 20 allowed). Consider refactoring.
Open

class QueueFake extends QueueManager implements Fake, Queue
{
    use ReflectsClosures;

    /**
Severity: Minor
Found in src/Illuminate/Support/Testing/Fakes/QueueFake.php - About 4 hrs to fix

    File Filesystem.php has 347 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      View has 33 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class View implements ArrayAccess, Htmlable, Stringable, ViewContract
      {
          use Macroable {
              __call as macroCall;
          }
      Severity: Minor
      Found in src/Illuminate/View/View.php - About 4 hrs to fix

        BroadcastManager has 33 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class BroadcastManager implements FactoryContract
        {
            /**
             * The application instance.
             *
        Severity: Minor
        Found in src/Illuminate/Broadcasting/BroadcastManager.php - About 4 hrs to fix

          Response has 33 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class Response implements ArrayAccess, Stringable
          {
              use Concerns\DeterminesStatusCode, Macroable {
                  __call as macroCall;
              }
          Severity: Minor
          Found in src/Illuminate/Http/Client/Response.php - About 4 hrs to fix

            Mailer has 33 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class Mailer implements MailerContract, MailQueueContract
            {
                use Macroable;
            
                /**
            Severity: Minor
            Found in src/Illuminate/Mail/Mailer.php - About 4 hrs to fix

              Kernel has 33 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Kernel implements KernelContract
              {
                  use InteractsWithTime;
              
                  /**
              Severity: Minor
              Found in src/Illuminate/Foundation/Http/Kernel.php - About 4 hrs to fix

                PhpRedisConnection has 33 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class PhpRedisConnection extends Connection implements ConnectionContract
                {
                    use PacksPhpRedisValues;
                
                    /**
                Severity: Minor
                Found in src/Illuminate/Redis/Connections/PhpRedisConnection.php - About 4 hrs to fix

                  MailFake has 33 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class MailFake implements Factory, Fake, Mailer, MailQueue
                  {
                      use ForwardsCalls, ReflectsClosures;
                  
                      /**
                  Severity: Minor
                  Found in src/Illuminate/Support/Testing/Fakes/MailFake.php - About 4 hrs to fix

                    File Middleware.php has 339 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    <?php
                    
                    namespace Illuminate\Foundation\Configuration;
                    
                    use Closure;
                    Severity: Minor
                    Found in src/Illuminate/Foundation/Configuration/Middleware.php - About 4 hrs to fix

                      File InteractsWithPivotTable.php has 338 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      namespace Illuminate\Database\Eloquent\Relations\Concerns;
                      
                      use BackedEnum;

                        File Migrator.php has 334 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        
                        namespace Illuminate\Database\Migrations;
                        
                        use Illuminate\Console\View\Components\BulletList;
                        Severity: Minor
                        Found in src/Illuminate/Database/Migrations/Migrator.php - About 4 hrs to fix

                          File Store.php has 331 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          namespace Illuminate\Session;
                          
                          use Closure;
                          Severity: Minor
                          Found in src/Illuminate/Session/Store.php - About 3 hrs to fix

                            Function data_get has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                                function data_get($target, $key, $default = null)
                                {
                                    if (is_null($key)) {
                                        return $target;
                                    }
                            Severity: Minor
                            Found in src/Illuminate/Collections/helpers.php - About 3 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

                            Function buildRoutingCallback has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function buildRoutingCallback(array|string|null $web,
                                    array|string|null $api,
                                    ?string $pages,
                                    ?string $health,
                                    string $apiPrefix,
                            Severity: Minor
                            Found in src/Illuminate/Foundation/Configuration/ApplicationBuilder.php - About 3 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

                            MailManager has 31 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class MailManager implements FactoryContract
                            {
                                /**
                                 * The application instance.
                                 *
                            Severity: Minor
                            Found in src/Illuminate/Mail/MailManager.php - About 3 hrs to fix

                              ResourceRegistrar has 31 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class ResourceRegistrar
                              {
                                  /**
                                   * The router instance.
                                   *
                              Severity: Minor
                              Found in src/Illuminate/Routing/ResourceRegistrar.php - About 3 hrs to fix

                                Kernel has 31 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class Kernel implements KernelContract
                                {
                                    use InteractsWithTime;
                                
                                    /**
                                Severity: Minor
                                Found in src/Illuminate/Foundation/Console/Kernel.php - About 3 hrs to fix

                                  ServiceProvider has 31 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  abstract class ServiceProvider
                                  {
                                      /**
                                       * The application instance.
                                       *
                                  Severity: Minor
                                  Found in src/Illuminate/Support/ServiceProvider.php - About 3 hrs to fix

                                    File ShowModelCommand.php has 326 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    <?php
                                    
                                    namespace Illuminate\Database\Console;
                                    
                                    use BackedEnum;
                                    Severity: Minor
                                    Found in src/Illuminate/Database/Console/ShowModelCommand.php - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language