CachableTrait   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 26
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\DoubleclickClient;
4
5
/**
6
 * Class CachableTrait
7
 */
8
trait CachableTrait
9
{
10
11
    /**
12
 * @var bool
13
*/
14
    protected $cacheEnabled;
15
16
    /**
17
     * @return boolean
18
     */
19
    public function isCacheEnabled()
20
    {
21
        return $this->cacheEnabled;
22
    }
23
24
    public function disableCache()
25
    {
26
        $this->cacheEnabled = false;
27
    }
28
29
    public function enableCache()
30
    {
31
        $this->cacheEnabled = true;
32
    }
33
}
34