Completed
Push — master ( 8c5cc3...01b1f4 )
by Francesco
02:33
created

CachableTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

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
/**
6
 * Class CachableTrait
7
 */
8
trait CachableTrait
9
{
10
11
    /** @var bool */
12
    protected $cacheEnabled;
13
14
    /**
15
     * @return boolean
16
     */
17
    public function isCacheEnabled()
18
    {
19
        return $this->cacheEnabled;
20
    }
21
22
    public function disableCache()
23
    {
24
        $this->cacheEnabled = false;
25
    }
26
27
    public function enableCache()
28
    {
29
        $this->cacheEnabled = true;
30
    }
31
}
32