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

Cacheable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 17
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
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