SoftDeleteTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

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