Function stats
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function stats()
{
if ($this->_stats !== null) {
return $this->_stats;
}
- 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 stats
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function stats()
{
if ($this->_stats !== null) {
return $this->_stats;
}
Method partition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function partition($index, $total)
{
$index = (integer) $index;
$total = (integer) $total;
if (!$index || !$total || $index > $total) {
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 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 _blockEnd
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _blockEnd($runAfterAll = true)
{
if (!$this->enabled()) {
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 partition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function partition($index, $total)
{
$index = (integer) $index;
$total = (integer) $total;
if (!$index || !$total || $index > $total) {
- 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"