Completed
Push — master ( ad2c0d...49711d )
by Yaro
10:29
created

SoftDeleteTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A enableSoftDelete() 0 4 1
A isSoftDeleteEnabled() 0 4 1
1
<?php
2
3
namespace Yaro\Jarboe\Table\CrudTraits;
4
5
trait SoftDeleteTrait
6
{
7
    private $softDeleteEnabled = false;
8
9 13
    public function enableSoftDelete(bool $enabled = true)
10
    {
11 13
        $this->softDeleteEnabled = $enabled;
12 13
    }
13
14 3
    public function isSoftDeleteEnabled(): bool
15
    {
16 3
        return $this->softDeleteEnabled;
17
    }
18
}
19