Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
86 | 18 | private function namespace(string $ns): CacheProvider |
|
87 | { |
||
88 | 18 | if (isset($this->driverByNamespace[$ns])) { |
|
89 | 17 | return $this->driverByNamespace[$ns]; |
|
90 | } |
||
91 | |||
92 | 18 | $driver = clone $this->driver; |
|
93 | 18 | $driver->setNamespace($ns); |
|
94 | |||
95 | 18 | return $this->driverByNamespace[$ns] = $driver; |
|
96 | } |
||
98 |