Showing 191 of 191 total issues
Avoid too many return
statements within this method. Open
return 'E_DEPRECATED';
Avoid too many return
statements within this method. Open
return 'E_STRICT';
Avoid too many return
statements within this method. Open
return '<INVALID>';
Avoid too many return
statements within this method. Open
return 'E_CORE_WARNING';
Avoid too many return
statements within this method. Open
return 'E_USER_ERROR';
Avoid too many return
statements within this method. Open
return 'E_USER_DEPRECATED';
Avoid too many return
statements within this method. Open
return 'E_CORE_ERROR';
Avoid too many return
statements within this method. Open
return 'E_USER_NOTICE';
Avoid too many return
statements within this method. Open
return 'E_COMPILE_ERROR';
Avoid too many return
statements within this method. Open
return 'E_COMPILE_WARNING';
Avoid too many return
statements within this method. Open
return 'E_RECOVERABLE_ERROR';
Function patch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function patch($source, $dest = null)
{
$source = ltrim($source, '\\');
if (is_object($source) || class_exists($source)) {
$reference = $source;
- 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 _execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _execute()
{
if (!$this->enabled() && !$this->focused()) {
return;
}
- 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 generate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function generate($options = [])
{
$defaults = [
'class' => 'Kahlan\Spec\Plugin\Double\Double' . static::$_index++,
'extends' => '',
- 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 broadcastFocus
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function broadcastFocus()
{
foreach ($this->_children as $child) {
if ($child->type() !== 'normal') {
continue;
- 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 match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function match($call, $withArgs = true)
{
if (preg_match('/^::.*/', $call['name'])) {
$call['static'] = true;
$call['name'] = substr($call['name'], 2);
- 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 _processNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _processNode($file, $node, $coverage, $path)
{
if ($node->type === 'namespace') {
$path = "{$path}" . $node->name . '\\';
$this->_processTree($file, $node->tree, $coverage, $path);
- 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 _functionNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _functionNode()
{
$node = new FunctionDef();
$token = $this->_stream->current(true);
$parent = $this->_states['current'];
- 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 _process
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _process($options = [])
{
$suite = $this->suite();
if ($suite->root()->focused() && !$this->focused()) {
return;
- 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 _generateInterfaceMethods
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected static function _generateInterfaceMethods($interfaces, $mask = 255)
{
if (!$interfaces) {
return [];
}
- 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"