Showing 63 of 63 total issues
Function canJobRun
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function canJobRun($class)
{
$job_definition = $this->jobs[$class];
if ($job_definition->getEnabled() == 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
Method canJobRun
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function canJobRun($class)
{
$job_definition = $this->jobs[$class];
if ($job_definition->getEnabled() == false)
{
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($class_name, $enabled = true, $run_time = null, $interval = 21600, $max_run_time = 172800)
Missing function doc comment Open
Open
public function __construct(LoggerInterface $logger = null)
- Exclude checks
Missing function doc comment Open
Open
public function getName();
- Exclude checks
Missing class doc comment Open
Open
class JobRunner
- Exclude checks
Expected 1 spaces after parameter type; 8 found Open
Open
* @param string $class The job that finished.
- Exclude checks
Missing function doc comment Open
Open
public function prepareToFork();
- Exclude checks
Missing parameter comment Open
Open
* @param int $lastRunTime
- Exclude checks
Missing parameter comment Open
Open
* @param int $lastRunTime
- Exclude checks
Missing @return tag in function comment Open
Open
*/
- Exclude checks
Expected 1 spaces after parameter type; 2 found Open
Open
* @param JobDefinition $definition Job definition (e.g. interval).
- Exclude checks
Missing class doc comment Open
Open
abstract class ForkingJob extends Job implements ForkingJobInterface
- Exclude checks
Missing function doc comment Open
Open
public function getItemCount();
- Exclude checks
Missing @return tag in function comment Open
Open
*/
- Exclude checks
Missing function doc comment Open
Open
public function start();
- Exclude checks
Missing file doc comment Open
Open
- Exclude checks
Missing class doc comment Open
Open
class ForkingComplimenter extends ForkingJob
- Exclude checks
Missing function doc comment Open
Open
public function getNumChildren();
- Exclude checks
Missing @return tag in function comment Open
Open
*/
- Exclude checks