Failed Conditions
Pull Request — develop (#6947)
by Filippo
10:01
created

UpdateTimestampCache::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
declare(strict_types=1);
5
6
namespace Doctrine\ORM\Cache\Region;
7
8
use Doctrine\ORM\Cache\TimestampCacheEntry;
9
use Doctrine\ORM\Cache\TimestampRegion;
10
use Doctrine\ORM\Cache\CacheKey;
11
12
/**
13
 * Tracks the timestamps of the most recent updates to particular keys.
14
 *
15
 * @since   2.5
16
 * @author  Fabio B. Silva <[email protected]>
17
 */
18
class UpdateTimestampCache extends DefaultRegion implements TimestampRegion
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23 94
    public function update(CacheKey $key)
24
    {
25 94
        $this->put($key, new TimestampCacheEntry);
26 94
    }
27
}
28