Completed
Push — master ( 036d78...0a4fc2 )
by Ievgen
05:10
created

AbstractStep   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 34
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0
1
<?php
2
3
namespace einfach\operation\step;
4
5
abstract class AbstractStep
6
{
7
    /**
8
     * @var callable
9
     */
10
    public $function;
11
    public $signature;
12
    public $track;
13
    /**
14
     * Indicates was this step performed or not
15
     *
16
     * @var bool
17
     */
18
    protected $skipped;
19
20
    public function __construct(callable $callable, string $signature)
21
    {
22
        $this->function = $callable;
23
        $this->signature = $signature;
24
        $this->skipped = false;
25
    }
26
27
    public function isSkipped()
28
    {
29
        return true == $this->skipped;
30
    }
31
32
    public function skip()
33
    {
34
        return $this->skipped = true;
35
    }
36
37
    abstract public public function __invoke(&$params, string $track);
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Multiple access type modifiers are not allowed
Loading history...
38
}
39