digipolisgent/robo-digipolis-drupal8

View on GitHub

Showing 22 of 118 total issues

Method defaultDbConfig has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function defaultDbConfig()
    {
        $settings = $this->getRemoteSettings(null, null, null, null);
        $webDir = $this->getConfig()->get('digipolis.root.web', false);
        if (!$webDir) {
Severity: Minor
Found in src/Robo/Plugin/Commands/DigipolisDrupal8DefaultHooksCommands.php - About 1 hr to fix

    Method handle has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function handle(GenericEvent $event)
        {
            /** @var RemoteConfig $remoteConfig */
            $remoteConfig = $event->getArgument('remoteConfig');
            $remoteSettings = $remoteConfig->getRemoteSettings();
    Severity: Minor
    Found in src/EventHandler/ClearCacheHandler.php - About 1 hr to fix

      Method handle has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function handle(GenericEvent $event)
          {
              /** @var RemoteConfig $remoteConfig */
              $remoteConfig = $event->getArgument('remoteConfig');
              $remoteSettings = $remoteConfig->getRemoteSettings();
      Severity: Minor
      Found in src/EventHandler/BackupRemoteHandler.php - About 1 hr to fix

        Method getLanguageUuids has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getLanguageUuids($uri = false, $aliases = [])
            {
                $aliases ??= [0 => false];
                $webDir = $this->getConfig()->get('digipolis.root.web', false);
                if (!$webDir) {
        Severity: Minor
        Found in src/Traits/Drupal8UtilsTrait.php - About 1 hr to fix

          Method addDrushInstallTask has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function addDrushInstallTask(
                CollectionBuilder $collection,
                array $options,
                array $aliases,
                string $profile,
          Severity: Minor
          Found in src/EventHandler/InstallDrupal8Handler.php - About 1 hr to fix

            Method handle has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function handle(GenericEvent $event)
                {
                    /** @var RemoteConfig $remoteConfig */
                    $remoteConfig = $event->getArgument('remoteConfig');
                    $remoteSettings = $remoteConfig->getRemoteSettings();
            Severity: Minor
            Found in src/EventHandler/InstallHandler.php - About 1 hr to fix

              Method addConfigImportTask has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function addConfigImportTask(CollectionBuilder $collection, array $options, ?string $uri = null, array $aliases = [])
                  {
                      if ($options['config-import']) {
                          $drushBase = CommandBuilder::create('vendor/bin/drush');
                          if ($uri) {
              Severity: Minor
              Found in src/EventHandler/Drupal8Handler.php - About 1 hr to fix

                Function handle has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function handle(GenericEvent $event)
                    {
                        /** @var RemoteConfig $remoteConfig */
                        $remoteConfig = $event->getArgument('remoteConfig');
                        $remoteSettings = $remoteConfig->getRemoteSettings();
                Severity: Minor
                Found in src/EventHandler/BackupRemoteHandler.php - About 1 hr 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 handle has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function handle(GenericEvent $event)
                    {
                        /** @var RemoteConfig $remoteConfig */
                        $remoteConfig = $event->getArgument('remoteConfig');
                        $remoteSettings = $remoteConfig->getRemoteSettings();
                Severity: Minor
                Found in src/EventHandler/InstallHandler.php - About 1 hr 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

                Method handle has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function handle(GenericEvent $event)
                    {
                        /** @var RemoteConfig $remoteConfig */
                        $remoteConfig = $event->getArgument('remoteConfig');
                        $remoteSettings = $remoteConfig->getRemoteSettings();
                Severity: Minor
                Found in src/EventHandler/RestoreBackupRemoteHandler.php - About 1 hr to fix

                  Method handle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function handle(GenericEvent $event)
                      {
                          /** @var RemoteConfig $remoteConfig */
                          $remoteConfig = $event->getArgument('remoteConfig');
                          $remoteSettings = $remoteConfig->getRemoteSettings();
                  Severity: Minor
                  Found in src/EventHandler/PreRestoreBackupRemoteHandler.php - About 1 hr to fix

                    Method digipolisSyncDrupal8 has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $sourceUser,
                            $sourceHost,
                            $sourceKeyFile,
                            $destinationUser,
                            $destinationHost,
                    Severity: Major
                    Found in src/Robo/Plugin/Commands/DigipolisDrupal8SyncCommand.php - About 1 hr to fix

                      Method digipolisSyncDrupal8 has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              $sourceUser,
                              $sourceHost,
                              $sourceKeyFile,
                              $destinationUser,
                              $destinationHost,
                      Severity: Major
                      Found in src/Robo/Plugin/Commands/DigipolisDrupal8Commands.php - About 1 hr to fix

                        Method addEnableMaintenanceModeTask has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function addEnableMaintenanceModeTask(CollectionBuilder $collection, ?string $uri = null)
                            {
                                $enableMaintenanceMode = CommandBuilder::create('cd')
                                    ->addFlag('P')
                                    ->addRawArgument(
                        Severity: Minor
                        Found in src/EventHandler/UpdateDrupal8Handler.php - About 1 hr to fix

                          Method getSiteUuid has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getSiteUuid($uri = false, $aliases = [])
                              {
                                  $aliases ??= [0 => false];
                                  $webDir = $this->getConfig()->get('digipolis.root.web', false);
                                  if (!$webDir) {
                          Severity: Minor
                          Found in src/Traits/Drupal8UtilsTrait.php - About 1 hr to fix

                            Function defaultDbConfig has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function defaultDbConfig()
                                {
                                    $settings = $this->getRemoteSettings(null, null, null, null);
                                    $webDir = $this->getConfig()->get('digipolis.root.web', false);
                                    if (!$webDir) {
                            Severity: Minor
                            Found in src/Robo/Plugin/Commands/DigipolisDrupal8DefaultHooksCommands.php - About 55 mins 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 getLanguageUuids has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getLanguageUuids($uri = false, $aliases = [])
                                {
                                    $aliases ??= [0 => false];
                                    $webDir = $this->getConfig()->get('digipolis.root.web', false);
                                    if (!$webDir) {
                            Severity: Minor
                            Found in src/Traits/Drupal8UtilsTrait.php - About 55 mins 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 handle has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function handle(GenericEvent $event)
                                {
                                    /** @var RemoteConfig $remoteConfig */
                                    $remoteConfig = $event->getArgument('remoteConfig');
                                    $remoteSettings = $remoteConfig->getRemoteSettings();
                            Severity: Minor
                            Found in src/EventHandler/RestoreBackupRemoteHandler.php - About 45 mins 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 handle has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function handle(GenericEvent $event)
                                {
                                    /** @var RemoteConfig $remoteConfig */
                                    $remoteConfig = $event->getArgument('remoteConfig');
                                    $remoteSettings = $remoteConfig->getRemoteSettings();
                            Severity: Minor
                            Found in src/EventHandler/PreRestoreBackupRemoteHandler.php - About 45 mins 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

                            Method addDrushInstallTask has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                  CollectionBuilder $collection,
                                  array $options,
                                  array $aliases,
                                  string $profile,
                                  ?string $uri = null
                            Severity: Minor
                            Found in src/EventHandler/InstallDrupal8Handler.php - About 35 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language