Completed
Push — master ( 778435...d8b9d0 )
by Freek
01:25
created

ActivityLogStatus::disabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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