Completed
Push — master ( d0f214...21b6ba )
by Marco
03:04
created

EnhancedCacheItemPoolStats   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 41.18%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 53
ccs 7
cts 17
cp 0.4118
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getId() 0 5 1
A getProvider() 0 5 1
A getObjects() 0 5 1
A getOptions() 0 5 1
A getState() 0 5 1
1
<?php namespace Comodojo\Cache\Components;
2
3
/**
4
 * @package     Comodojo Cache
5
 * @author      Marco Giovinazzi <[email protected]>
6
 * @license     MIT
7
 *
8
 * LICENSE:
9
 *
10
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
16
 * THE SOFTWARE.
17
 */
18
19
class EnhancedCacheItemPoolStats {
20
21
    protected $id;
22
23
    protected $provider;
24
25
    protected $status;
26
27
    protected $objects = 0;
28
29
    protected $options = [];
30
31 14
    public function __construct($id, $provider, $status = 0, $objects = 0, array $options = []) {
32
33 14
        $this->id = $id;
34 14
        $this->provider = $provider;
35 14
        $this->status = $status;
36 14
        $this->objects = $objects;
37 14
        $this->options = $options;
38
39 14
    }
40
41
    public function getId() {
42
43
        return $this->id;
44
45
    }
46
47
    public function getProvider() {
48
49
        return $this->provider;
50
51
    }
52
53
    public function getState() {
54
55
        return $this->status;
56
57
    }
58
59
    public function getObjects() {
60
61
        return $this->objects;
62
63
    }
64
65
    public function getOptions() {
66
67
        return $this->options;
68
69
    }
70
71
}
72