Completed
Push — master ( c86f07...f64f9c )
by Pierre
02:47
created

Cacheable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Reuse\Controllers;
6
7
use Nymfonya\Component\Container;
8
use App\Reuse\Controllers\AbstractApi;
9
use App\Reuse\Controllers\Api\TRedisCache;
10
use App\Reuse\Controllers\Api\TFileCache;
11
12
abstract class Cacheable extends AbstractApi
13
{
14
15
    const CACHE_TTL = 3600;
16
17
    use TRedisCache;
18
    use TFileCache;
19
20
    /**
21
     * constructor
22
     *
23
     */
24 10
    public function __construct(Container $container)
25
    {
26 10
        parent::__construct($container);
27 10
        $this->initRedisClient($container);
28 10
        $this->setRedisCacheTtl(self::CACHE_TTL);
29
    }
30
}
31