Completed
Push — master ( 70ed4c...f56a68 )
by Ievgen
05:07 queued 03:10
created

AbstractStep::isSkipped()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
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;
0 ignored issues
show
Coding Style Best Practice introduced by
It seems like you are loosely comparing two booleans. Considering using the strict comparison === instead.

When comparing two booleans, it is generally considered safer to use the strict comparison operator.

Loading history...
30
    }
31
32
    public function skip()
33
    {
34
        return $this->skipped = true;
35
    }
36
37
    abstract public function __invoke(&$params, string $track);
38
}
39