Completed
Branch master (c4a11b)
by Adrian Florin
10:27 queued 07:46
created

ExecutionStateTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 24
c 0
b 0
f 0
wmc 2
lcom 1
cbo 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hasExecuted() 0 4 1
A markAsExecuted() 0 4 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