Completed
Push — master ( 9e3c5b...9ae6ad )
by Rasmus
04:22
created

TestableDatabaseCache   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Kodus\Cache\Tests;
4
5
use Kodus\Cache\DatabaseCache;
6
7
class TestableDatabaseCache extends DatabaseCache
8
{
9
    protected $time_travel = 0;
10
11
    protected function getTime()
12
    {
13
        return parent::getTime() + $this->time_travel;
14
    }
15
16
    public function timeTravel(int $time)
17
    {
18
        $this->time_travel += $time;
19
    }
20
}
21