Completed
Push — master ( 3b577d...673a4c )
by Sergey
02:52
created

ValueWithBootstrap   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * Yii 2 PHP file cache.
4
 *
5
 * @see       https://github.com/sergeymakinen/yii2-php-file-cache
6
 * @copyright Copyright (c) 2016 Sergey Makinen (https://makinen.ru)
7
 * @license   https://github.com/sergeymakinen/yii2-php-file-cache/blob/master/LICENSE The MIT License
8
 */
9
10
namespace sergeymakinen\caching;
11
12
use yii\base\Object;
13
14
/**
15
 * Allows caching a value along with a PHP code in [[PhpFileCache]].
16
 */
17
class ValueWithBootstrap extends Object
18
{
19
    /**
20
     * @var string the PHP code represented by this object.
21
     */
22
    public $bootstrap;
23
24
    /**
25
     * @var mixed the value represented by this object.
26
     */
27
    public $value;
28
29
    /**
30
     * Creates a new object.
31
     *
32
     * @param mixed $value the value represented by this object.
33
     * @param string $bootstrap the PHP code represented by this object.
34
     * @param array $config name-value pairs that will be used to initialize the object properties.
35
     */
36 5
    public function __construct($value, $bootstrap, $config = [])
37
    {
38 5
        $this->value = $value;
39 5
        $this->bootstrap = $bootstrap;
40 5
        parent::__construct($config);
41 5
    }
42
}
43