Function process
has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring. Open
public function process($hdrList, $curArtNr, $increment, $timer)
{
$this->displayStatus('progress', $curArtNr.' till '.$increment);
$signedCount = 0;
- 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 process
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($hdrList, $curArtNr, $increment, $timer)
{
$this->displayStatus('progress', $curArtNr.' till '.$increment);
$signedCount = 0;
File Services_Retriever_Spots.php
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Retriever_Spots extends Services_Retriever_Base
{
/**
Function displayStatus
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function displayStatus($cat, $txt)
{
switch ($cat) {
case 'start': echo 'Retrieving new Spots from server '.$txt.'...'.PHP_EOL;
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"
Further reading
Method displayStatus
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function displayStatus($cat, $txt)
{
switch ($cat) {
case 'start': echo 'Retrieving new Spots from server '.$txt.'...'.PHP_EOL;
break;
Function removeInvalidDisposes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function removeInvalidDisposes($moderationList)
{
/* check all dispose messages */
$tmpArray = $this->_spotDao->getDisposedSpots($moderationList);
foreach ($tmpArray as $value) {
- 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"