Factory::getPool()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 3
dl 0
loc 9
ccs 4
cts 4
cp 1
crap 2
rs 9.9666
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 * This file is part of the Apix Project.
5
 *
6
 * (c) Franck Cassedanne <franck at ouarz.net>
7
 *
8
 * @license     http://opensource.org/licenses/BSD-3-Clause  New BSD License
9
 *
10
 */
11
12
namespace Apix\SimpleCache;
13
14
use Apix\Cache;
15
16
/**
17
 * Factory class that provides a PSR-16 (Simple Cache) wrapper to Apix-Cache.
18
 *
19
 * @author Franck Cassedanne <franck at ouarz.net>
20
 */
21
class Factory extends Cache\Factory
22
{
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 8
    public static function getPool(
28
        $mix, array $options=array(), $taggable=false
29
    ) {
30 8
        $pool = parent::getPool($mix, $options, $taggable);
31
32
        return $taggable
33 6
                ? new PsrSimpleCache\TaggablePool($pool)
34 6
                : new PsrSimpleCache\Pool($pool);
35
    }
36
37
    /**
38
     * @see self::getPool
39
     * @return TaggablePool
40
     */
41 1
    public static function getTaggablePool($mix, array $options=array())
42
    {
43 1
        return self::getPool($mix, $options, true);
44
    }
45
}
46