Capsule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace PhpDbaCache;
4
5
/**
6
 * Cache Capsule Container
7
 *
8
 * @category PhpDbaCache
9
 */
10
class Capsule
11
{
12
    /**
13
     * Class name of the object
14
     * @var string
15
     */
16
    public $type;
17
18
    /**
19
     * The object that should be cached
20
     *
21
     * @var object
22
     */
23
    public $object;
24
25
    /**
26
     * If object or array should be vacuumed
27
     *
28
     * @var bool
29
     */
30
    public $fake;
31
32
    /**
33
     * Make-time as current unix timestamp in microseconds
34
     *
35
     * @var mixed
36
     */
37
    public $mtime;
38
39
    /**
40
     * Life-time as current unix timestamp in microseconds
41
     *
42
     * @var bool|int
43
     */
44
    public $ltime;
45
46
    /**
47
     * @param bool     $fake
48
     * @param int|bool $ltime
49
     * @param object   $object
50
     */
51
    public function __construct($fake, $ltime, $object)
52
    {
53
        $this->fake = $fake;
54
        $this->ltime = $ltime;
55
        $this->mtime = microtime(true);
56
        $this->object = $object;
57
        $this->type = get_class($object);
58
    }
59
}
60