Showing 11 of 11 total issues
Method run
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$themesFromConfig = $this->getConfig()->get('digipolis.themes.drupal8', false);
$themeNamesFromConfig = [];
if ($themesFromConfig) {
Method run
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$themes = empty($this->themes)
? $this->getConfig()->get('digipolis.themes.drupal8', false)
: $this->themes;
Method getThemePaths
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getThemePaths($themes)
{
$dirsFromConfig = array_filter(
[
$this->getConfig()->get('digipolis.root.project', false),
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
Function run
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$themesFromConfig = $this->getConfig()->get('digipolis.themes.drupal8', false);
$themeNamesFromConfig = [];
if ($themesFromConfig) {
- Read upRead up
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 run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$themes = empty($this->themes)
? $this->getConfig()->get('digipolis.themes.drupal8', false)
: $this->themes;
- Read upRead up
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 getThemePaths
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getThemePaths($themes)
{
$dirsFromConfig = array_filter(
[
$this->getConfig()->get('digipolis.root.project', false),
- Read upRead up
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
Avoid unused parameters such as '$io'. Open
public function digipolisPackageDrupal8(ConsoleIO $io, $archiveFile, $dir = null, $opts = ['ignore|i' => ''])
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$io'. Open
public function digipolisThemesCompileDrupal8(ConsoleIO $io, $themes = '', $dirs = '')
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused parameters such as '$io'. Open
public function digipolisThemesCleanDrupal8(ConsoleIO $io, $themes = '', $dirs = '')
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Line exceeds 120 characters; contains 139 characters Open
class DigipolisPackageDrupal8Commands extends \Robo\Tasks implements DigipolisPropertiesAwareInterface, \Robo\Contract\ConfigAwareInterface
- Exclude checks