digipolisgent/robo-drupal-console

View on GitHub

Showing 9 of 9 total issues

DrupalConsoleStack has 42 functions (exceeds 20 allowed). Consider refactoring.
Open

class DrupalConsoleStack extends CommandStack
{

    use CommandArguments {
        option as optionNoEqualSign;
Severity: Minor
Found in src/DrupalConsoleStack.php - About 5 hrs to fix

    The class DrupalConsoleStack has an overall complexity of 57 which is very high. The configured complexity threshold is 50.
    Open

    class DrupalConsoleStack extends CommandStack
    {
    
        use CommandArguments {
            option as optionNoEqualSign;
    Severity: Minor
    Found in src/DrupalConsoleStack.php by phpmd

    The class DrupalConsoleStack has 38 public methods. Consider refactoring DrupalConsoleStack to keep number of public methods under 10.
    Open

    class DrupalConsoleStack extends CommandStack
    {
    
        use CommandArguments {
            option as optionNoEqualSign;
    Severity: Minor
    Found in src/DrupalConsoleStack.php by phpmd

    TooManyPublicMethods

    Since: 0.1

    A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    Example

    Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

    The class DrupalConsoleStack has 41 non-getter- and setter-methods. Consider refactoring DrupalConsoleStack to keep number of methods under 25.
    Open

    class DrupalConsoleStack extends CommandStack
    {
    
        use CommandArguments {
            option as optionNoEqualSign;
    Severity: Minor
    Found in src/DrupalConsoleStack.php by phpmd

    TooManyMethods

    Since: 0.1

    A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    The default was changed from 10 to 25 in PHPMD 2.3.

    Example

    Source https://phpmd.org/rules/codesize.html#toomanymethods

    File DrupalConsoleStack.php has 304 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace DigipolisGent\Robo\Task\DrupalConsole;
    
    use Robo\Common\CommandArguments;
    Severity: Minor
    Found in src/DrupalConsoleStack.php - About 3 hrs to fix

      Each class must be in a namespace of at least one level (a top-level vendor name)
      Open

      class RoboFile extends \Robo\Tasks
      Severity: Minor
      Found in RoboFile.php by phpcodesniffer

      The method maintenance has a boolean flag argument $mode, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function maintenance($mode = true)
      Severity: Minor
      Found in src/DrupalConsoleStack.php by phpmd

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method drupal has a boolean flag argument $assumeYes, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function drupal($command, $assumeYes = true)
      Severity: Minor
      Found in src/DrupalConsoleStack.php by phpmd

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      Trait name "loadTasks" is not in camel caps format
      Open

      trait loadTasks
      Severity: Minor
      Found in src/loadTasks.php by phpcodesniffer
      Severity
      Category
      Status
      Source
      Language