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

UpdateTimestampCache   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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