wol-soft/php-workflow

View on GitHub

Showing 116 of 116 total issues

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private array $stages = [];
Severity: Critical
Found in src/State/ExecutionLog/ExecutionLog.php by phan

syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private string $indentation = '';

Replace this function name "onError" with "__construct".
Open

    public function onError(WorkflowStep $step): self
Severity: Major
Found in src/Stage/OnError.php by sonar-php

In PHP 4, any function with the same name as the nesting class was considered a class constructor. In PHP 5, this mechanism has been deprecated and the "__construct" method name should be used instead. If both styles are present in the same class, PHP 5 will treat the function named "__construct" as the class constructor.

This rule rule raises an issue for each method with the same name as the enclosing class.

Noncompliant Code Example

class Foo {
  function Foo(){...}
}

Compliant Solution

class Foo {
  function __construct(){...}
}

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
Open

    protected array $items = [];
Severity: Critical
Found in src/State/WorkflowContainer.php by phan

syntax error, unexpected ')'
Open

            );
Severity: Critical
Found in src/Step/StepExecutionTrait.php by phan

syntax error, unexpected ')'
Open

        );

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private array $validators = [];
Severity: Critical
Found in src/Stage/Validate.php by phan

syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private string $description;
Severity: Critical
Found in src/State/ExecutionLog/Summary.php by phan

syntax error, unexpected 'WorkflowResult' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private WorkflowResult $workflowResult;
Severity: Critical
Found in src/Exception/WorkflowException.php by phan

syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private array $steps = [];
Severity: Critical
Found in src/Stage/MultiStepStage.php by phan

Call with 1 arg(s) to \PHPWorkflow\Stage\Before::__construct() which only takes 0 arg(s) defined at /code/src/Stage/Before.php:11
Open

        return $this->nextStage = (new Before($this->workflow))->before($step);
Severity: Info
Found in src/Stage/Next/AllowNextBefore.php by phan

syntax error, unexpected 'ExecutableWorkflow' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private ExecutableWorkflow $nestedWorkflow;
Severity: Critical
Found in src/Step/NestedWorkflow.php by phan

syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private string $name;
Severity: Critical
Found in src/Workflow.php by phan

syntax error, unexpected 'WorkflowContainer' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private WorkflowContainer $parentContainer;
Severity: Critical
Found in src/State/NestedContainer.php by phan

syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private string $path;

syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    private string $info;
Severity: Critical
Found in src/State/ExecutionLog/StepInfo.php by phan
Severity
Category
Status
Source
Language