Function process
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function process($action, $form, $process = true)
{
if ($action == $this->resetAction) {
$this->clearContainer();
$this->setCurrentStep($this->getFirstIncompleteStep());
- 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
ZervWizard
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class ZervWizard
{
// whether or not all steps of the form are complete
public $_complete = false;
// internal array to store the various steps
File ZervWizard.php
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace XoopsModules\Pedigree;
/**
Method process
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process($action, $form, $process = true)
{
if ($action == $this->resetAction) {
$this->clearContainer();
$this->setCurrentStep($this->getFirstIncompleteStep());
Function getFollowingStep
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getFollowingStep($step)
{
$ret = null;
$steps = \array_keys($this->_steps);
- 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 stepCanBeProcessed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function stepCanBeProcessed($step)
{
$steps = \array_keys($this->_steps);
$numSteps = \count($steps);
- 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"