Passed
Push — master ( 829dd4...d4da04 )
by Thomas
02:16
created

CacheProxy::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 7
rs 10
1
<?php
2
3
namespace LeKoala\DebugBar\Proxy;
4
5
use Symfony\Component\Cache\Psr16Cache;
6
7
class CacheProxy extends Psr16Cache
8
{
9
    protected static $data = [];
10
11
    public function set($key, $value, $ttl = null): bool
12
    {
13
        self::$data[$key] = [
14
            "value" => $value,
15
            "ttl" => $ttl
16
        ];
17
        return parent::set($key, $value, $ttl);
18
    }
19
20
    public static function getData(): array
21
    {
22
        return self::$data;
23
    }
24
}
25