CachableTrait::isCacheEnabled()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Audiens\AppnexusClient;
4
5
trait CachableTrait
6
{
7
8
    /** @var bool */
9
    protected $cacheEnabled;
10
11
    public function isCacheEnabled(): bool
12
    {
13
        return $this->cacheEnabled;
14
    }
15
16
    public function disableCache()
17
    {
18
        $this->cacheEnabled = false;
19
    }
20
21
    public function enableCache()
22
    {
23
        $this->cacheEnabled = true;
24
    }
25
}
26