laravel/framework

View on GitHub

Showing 864 of 1,073 total issues

SqlServerGrammar has 35 functions (exceeds 20 allowed). Consider refactoring.
Open

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

    File MessageSelector.php has 354 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Illuminate\Translation;
    
    class MessageSelector
    Severity: Minor
    Found in src/Illuminate/Translation/MessageSelector.php - About 4 hrs to fix

      File Request.php has 353 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        Response has 34 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

          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

                  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

                    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

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

                      abstract class ServiceProvider
                      {
                          /**
                           * The application instance.
                           *
                      Severity: Minor
                      Found in src/Illuminate/Support/ServiceProvider.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 340 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;

                              Function update has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function update(Fluent $command)
                                  {
                                      switch ($command->name) {
                                          case 'alter':
                                              // Already handled...
                              Severity: Minor
                              Found in src/Illuminate/Database/Schema/BlueprintState.php - About 4 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 28 (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 4 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 Store.php has 335 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 4 hrs to fix

                                File ShowModelCommand.php has 332 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 4 hrs to fix

                                  File Migrator.php has 331 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 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language