digipolisgent/robo-digipolis-drupal8

View on GitHub
src/EventHandler/InstallDrupal8Handler.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

      Function addDrushInstallTask has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function addDrushInstallTask(
            CollectionBuilder $collection,
            array $options,
            array $aliases,
            string $profile,
      Severity: Minor
      Found in src/EventHandler/InstallDrupal8Handler.php - About 35 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

      Multi-line function declaration not indented correctly; expected 8 spaces but found 6
      Open

            array $options,

      Multi-line function declaration not indented correctly; expected 8 spaces but found 6
      Open

            array $aliases,

      Multi-line function declaration not indented correctly; expected 8 spaces but found 6
      Open

            string $profile,

      Multi-line function declaration not indented correctly; expected 8 spaces but found 6
      Open

            ?string $uri = null

      Multi-line function declaration not indented correctly; expected 8 spaces but found 6
      Open

            CollectionBuilder $collection,

      Line exceeds 120 characters; contains 131 characters
      Open

              if (!$this->taskExec('[[ $(' . $this->usersTableCheckCommand('vendor/bin/drush', $uri) . ') ]]')->run()->wasSuccessful()) {

      The variable $site_path is not named in camelCase.
      Open

          protected function addDrushInstallTask(
            CollectionBuilder $collection,
            array $options,
            array $aliases,
            string $profile,

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $app_root is not named in camelCase.
      Open

          protected function addDrushInstallTask(
            CollectionBuilder $collection,
            array $options,
            array $aliases,
            string $profile,

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $site_path is not named in camelCase.
      Open

          protected function addDrushInstallTask(
            CollectionBuilder $collection,
            array $options,
            array $aliases,
            string $profile,

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $site_path is not named in camelCase.
      Open

          protected function addDrushInstallTask(
            CollectionBuilder $collection,
            array $options,
            array $aliases,
            string $profile,

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $app_root is not named in camelCase.
      Open

          protected function addDrushInstallTask(
            CollectionBuilder $collection,
            array $options,
            array $aliases,
            string $profile,

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      There are no issues that match your filters.

      Category
      Status