Showing 26 of 57 total issues
Function get_missing_dependencies
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function get_missing_dependencies(): array {
$missing = array();
foreach ( $this->get_dependencies() as $dependency ) {
$is_active = $this->is_plugin_active( $dependency['plugin'], $dependency );
- 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 too many return
statements within this method. Open
return $this->validate_float( $value, $default_key, $handler_id );
Avoid too many return
statements within this method. Open
return $this->validate_callable( $value, $default_key, $handler_id );
Function get_container_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function get_container_value( string $key ) {
$boom = \explode( '/', $key );
$key = \array_shift( $boom );
$value = $this->get_container_entry( $key );
- 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 get_container_value
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function get_container_value( string $key, string $container_id ) {
$boom = \explode( '/', $key );
$key = \array_shift( $boom );
$value = $this->get_container_entry( $key, $container_id );
- 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 get_dependencies_handler_id
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_dependencies_handler_id( ?string $context = null ): string {
switch ( $context ) {
case DependencyContextsEnum::ACTIVE_STATE:
$handler_id = 'active_%s';
break;
- 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"