LRUCacheItem   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 27
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace CHMLib\LZX;
4
5
/**
6
 * Represent an cached item handled by LRUCache.
7
 */
8
class LRUCacheItem
9
{
10
    /**
11
     * The item value.
12
     *
13
     * @var mixed
14
     */
15
    public $value;
16
17
    /**
18
     * The item hit count.
19
     *
20
     * @var int
21
     */
22
    public $hits;
23
24
    /**
25
     * Initializes the instance.
26
     *
27
     * @param mixed $value The item value.
28
     */
29 26
    public function __construct($value)
30
    {
31 26
        $this->value = $value;
32 26
        $this->hits = 1;
33 26
    }
34
}
35