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

FilesystemCacheProvider::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
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