CachableTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isCacheEnabled() 0 4 1
A disableCache() 0 4 1
A enableCache() 0 4 1
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