Factory   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPool() 0 9 2
A getTaggablePool() 0 4 1
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