Completed
Pull Request — 1.x (#214)
by Yuu
03:24 queued 55s
created

FilesystemCacheProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 20
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 4 1
1
<?php
2
/**
3
 * This file is part of the BEAR.Package package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace BEAR\Package\Context\Provider;
8
9
use BEAR\AppMeta\AbstractAppMeta;
10
use Doctrine\Common\Cache\FilesystemCache;
11
use Ray\Di\ProviderInterface;
12
13
class FilesystemCacheProvider implements ProviderInterface
14
{
15
    /**
16
     * @var AbstractAppMeta
17
     */
18
    private $app;
19
20
    public function __construct(AbstractAppMeta $app)
21
    {
22
        $this->app = $app;
23
    }
24
25
    /**
26
     * @inheritDoc
27
     */
28
    public function get()
29
    {
30
        return new FilesystemCache($this->app->tmpDir . '/cache');
31
    }
32
}
33