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;
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;
- Read upRead up
- Exclude checks
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
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;
- Exclude checks
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;
- Read upRead up
- Exclude checks
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
File DrupalConsoleStack.php
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace DigipolisGent\Robo\Task\DrupalConsole;
use Robo\Common\CommandArguments;
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class RoboFile extends \Robo\Tasks
- Exclude checks
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)
- Read upRead up
- Exclude checks
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 maintenance has a boolean flag argument $mode, which is a certain sign of a Single Responsibility Principle violation. Open
public function maintenance($mode = true)
- Read upRead up
- Exclude checks
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
- Exclude checks