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

BatchCheckboxesTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 60%

Importance

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

2 Methods

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