CacheController::setAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
}