Function loadThing
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function loadThing( &$dependencies, $name, $extensions, $skins ) {
$extDir = $this->getConfig()->get( MainConfigNames::ExtensionDirectory );
$styleDir = $this->getConfig()->get( MainConfigNames::StyleDirectory );
$queue = [];
$missing = 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
Function addToDependencies
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function addToDependencies( &$dependencies, $extensions, $skins,
$why = null, $status = null, $message = null
) {
$mainRegistry = ExtensionRegistry::getInstance();
$iter = [ 'extensions' => $extensions, 'skins' => $skins ];
- 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
Method loadThing
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function loadThing( &$dependencies, $name, $extensions, $skins ) {
$extDir = $this->getConfig()->get( MainConfigNames::ExtensionDirectory );
$styleDir = $this->getConfig()->get( MainConfigNames::StyleDirectory );
$queue = [];
$missing = false;
Function execute
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$this->checkDev = $this->hasOption( 'dev' );
$extensions = $this->hasOption( 'extensions' )
? explode( ',', $this->getOption( 'extensions' ) )
: [];
- 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
Method execute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
$this->checkDev = $this->hasOption( 'dev' );
$extensions = $this->hasOption( 'extensions' )
? explode( ',', $this->getOption( 'extensions' ) )
: [];
Method addToDependencies
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function addToDependencies( &$dependencies, $extensions, $skins,
$why = null, $status = null, $message = null
Function formatForHumans
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function formatForHumans( $dependencies ) {
$text = '';
foreach ( $dependencies as $type => $things ) {
$text .= ucfirst( $type ) . "\n" . str_repeat( '=', strlen( $type ) ) . "\n";
foreach ( $things as $thing => $info ) {
- 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"