ActivityLogStatus::disabled()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\Activitylog;
4
5
use Illuminate\Contracts\Config\Repository;
6
7
class ActivityLogStatus
8
{
9
    protected $enabled = true;
10
11 340
    public function __construct(Repository $config)
12
    {
13 340
        $this->enabled = $config['activitylog.enabled'];
14 340
    }
15
16 4
    public function enable(): bool
17
    {
18 4
        return $this->enabled = true;
19
    }
20
21 4
    public function disable(): bool
22
    {
23 4
        return $this->enabled = false;
24
    }
25
26 340
    public function disabled(): bool
27
    {
28 340
        return $this->enabled === false;
29
    }
30
}
31