wol-soft/php-workflow

View on GitHub

Showing 116 of 116 total issues

The CASE body must start on the line following the statement
Open

            case WorkflowState::STAGE_PREPARE: return 'Prepare';

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_ON_SUCCESS: return 'On Success';

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_SUMMARY: return 'Summary';

The CASE body must start on the line following the statement
Open

            case WorkflowState::STAGE_VALIDATE: return 'Validate';

Terminating statement must be on a line by itself
Open

            default: return "{$this->indentation}    - " . $info->getInfo();

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_VALIDATE: return 'Validate';

The CASE body must start on the line following the statement
Open

            case WorkflowState::STAGE_BEFORE: return 'Before';

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_AFTER: return 'After';

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_ON_ERROR: return 'On Error';

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_PREPARE: return 'Prepare';

Terminating statement must be on a line by itself
Open

            case WorkflowState::STAGE_BEFORE: return 'Before';

The CASE body must start on the line following the statement
Open

            case WorkflowState::STAGE_PROCESS: return 'Process';

The CASE body must start on the line following the statement
Open

            case WorkflowState::STAGE_ON_ERROR: return 'On Error';

The method validate has a boolean flag argument $hardValidator, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function validate(WorkflowStep $step, bool $hardValidator = false): self
Severity: Minor
Found in src/Stage/Validate.php by phpmd

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

            case WorkflowState::STAGE_AFTER: return 'After';
Severity: Major
Found in src/State/ExecutionLog/ExecutionLog.php - About 30 mins to fix

    The method __construct has a boolean flag argument $continueOnError, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function __construct(LoopControl $loopControl, bool $continueOnError = false)
    Severity: Minor
    Found in src/Step/Loop.php by phpmd

    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

                case WorkflowState::STAGE_ON_SUCCESS: return 'On Success';
    Severity: Major
    Found in src/State/ExecutionLog/ExecutionLog.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  default: return "{$this->indentation}    - " . $info->getInfo();
      Severity: Major
      Found in src/State/ExecutionLog/OutputFormat/StringLog.php - About 30 mins to fix

        The method addWarning has a boolean flag argument $workflowReportWarning, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function addWarning(string $message, bool $workflowReportWarning = false): void

        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

                    case WorkflowState::STAGE_ON_ERROR: return 'On Error';
        Severity: Major
        Found in src/State/ExecutionLog/ExecutionLog.php - About 30 mins to fix
          Severity
          Category
          Status
          Source
          Language