CacheController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setAction() 0 4 1
A getAction() 0 4 1
1
<?php
2
3
namespace Spiral\Tests\PhpFastCache;
4
5
use Psr\SimpleCache\CacheInterface;
6
use Spiral\Core\Controller;
7
8
/**
9
 * Class CacheController
10
 *
11
 * @package Spiral\Tests\PhpFastCache
12
 * @property CacheInterface $cache
13
 */
14
class CacheController extends Controller
15
{
16
    public function setAction()
17
    {
18
        $this->cache->set(CacheTest::NAME, CacheTest::VALUE);
19
    }
20
21
    public function getAction()
22
    {
23
        return $this->cache->get(CacheTest::NAME);
24
    }
25
}