wol-soft/php-workflow

View on GitHub
src/Stage/Process.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

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

    public function process(WorkflowStep $step): self
Severity: Major
Found in src/Stage/Process.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(){...}
}

There are no issues that match your filters.

Category
Status