Passed
Pull Request — master (#159)
by Mohamed
12:54
created

CacheAdapter::setContext()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace LeKoala\DebugBar\Proxy;
4
5
use SilverStripe\Versioned\Caching\VersionedCacheAdapter;
6
7
class CacheAdapter extends VersionedCacheAdapter
8
{
9
    public function setContext(string $context): self
10
    {
11
        if (method_exists($this->pool, 'setContext')) {
12
            $this->pool->setContext($context);
13
        }
14
15
        return $this;
16
    }
17
}
18