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

AbstractStep::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 2
dl 0
loc 6
ccs 0
cts 6
cp 0
crap 2
rs 9.4285
c 0
b 0
f 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