Showing 116 of 116 total issues
The CASE body must start on the line following the statement Open
Open
case WorkflowState::STAGE_PREPARE: return 'Prepare';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_ON_SUCCESS: return 'On Success';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_SUMMARY: return 'Summary';
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case WorkflowState::STAGE_VALIDATE: return 'Validate';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
default: return "{$this->indentation} - " . $info->getInfo();
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_VALIDATE: return 'Validate';
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case WorkflowState::STAGE_BEFORE: return 'Before';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_AFTER: return 'After';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_ON_ERROR: return 'On Error';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_PREPARE: return 'Prepare';
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case WorkflowState::STAGE_BEFORE: return 'Before';
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case WorkflowState::STAGE_PROCESS: return 'Process';
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case WorkflowState::STAGE_ON_ERROR: return 'On Error';
- Exclude checks
The method validate has a boolean flag argument $hardValidator, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function validate(WorkflowStep $step, bool $hardValidator = false): self
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid too many return
statements within this method. Open
Open
case WorkflowState::STAGE_AFTER: return 'After';
The method __construct has a boolean flag argument $continueOnError, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function __construct(LoopControl $loopControl, bool $continueOnError = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid too many return
statements within this method. Open
Open
case WorkflowState::STAGE_ON_SUCCESS: return 'On Success';
Avoid too many return
statements within this method. Open
Open
default: return "{$this->indentation} - " . $info->getInfo();
The method addWarning has a boolean flag argument $workflowReportWarning, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function addWarning(string $message, bool $workflowReportWarning = false): void
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid too many return
statements within this method. Open
Open
case WorkflowState::STAGE_ON_ERROR: return 'On Error';