Component   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 27
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A psr6() 0 4 1
A phpCache() 0 4 1
A resolveCustom() 0 4 1
1
<?php
2
3
namespace Mosaic\Cache;
4
5
use Mosaic\Cache\Adapters\PhpCache\Component as PhpCacheComponent;
6
use Mosaic\Common\Components\AbstractComponent;
7
8
class Component extends AbstractComponent
9
{
10
    /**
11
     * @return PhpCacheComponent
12
     */
13
    public static function psr6()
14
    {
15
        return static::phpCache();
16
    }
17
18
    /**
19
     * @return PhpCacheComponent
20
     */
21
    public static function phpCache()
22
    {
23
        return new PhpCacheComponent();
24
    }
25
26
    /**
27
     * @param  callable $callback
28
     * @return array
29
     */
30
    public function resolveCustom(callable $callback) : array
31
    {
32
        return $callback();
33
    }
34
}
35