1 | <?php |
||
9 | abstract class AbstractStep |
||
10 | { |
||
11 | /** |
||
12 | * @var callable |
||
13 | */ |
||
14 | public $function; |
||
15 | protected $name; |
||
16 | /** |
||
17 | * Indicates was this step performed or not |
||
18 | * |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $skipped; |
||
22 | |||
23 | 7 | public function __construct(callable $callable, string $name = null) |
|
29 | |||
30 | 5 | public function isSkipped() : bool |
|
34 | |||
35 | 3 | public function skip() : bool |
|
39 | |||
40 | 3 | public function functionName() : string |
|
45 | |||
46 | /** |
||
47 | * Transform all results into valid resut array form |
||
48 | * It could be Result object instance for nested steps |
||
49 | */ |
||
50 | 2 | protected function normalizeStepResult($result) : array { |
|
69 | |||
70 | abstract public function __invoke(&$params, string $track); |
||
71 | } |
||
72 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.