Passed
Push — master ( 93f10a...c4a11b )
by Tilita
08:36
created

ExecutionStateTrait::hasExecuted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace NeedleProject\Transaction;
3
4
/**
5
 * Trait ExecutionStateTrait
6
 *
7
 * @package NeedleProject\Transaction
8
 * @author  Adrian Tilita <[email protected]>
9
 */
10
trait ExecutionStateTrait
11
{
12
    /**
13
     * @var bool
14
     */
15
    private $executionStatus = false;
16
17
    /**
18
     * Retrieve the execution state of the process
19
     * @return bool
20
     */
21 6
    public function hasExecuted(): bool
22
    {
23 6
        return $this->executionStatus;
24
    }
25
26
    /**
27
     * Mark the process as executed
28
     */
29 5
    public function markAsExecuted()
30
    {
31 5
        $this->executionStatus = true;
32 5
    }
33
}
34