HitCounterRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A save() 0 4 2
1
<?php
2
/**
3
 * HitCounterRepository 
4
*/
5
6
namespace coderius\hitCounter\repositories;
7
8
use coderius\hitCounter\entities\HitCounter;
9
10
class HitCounterRepository{
11
12 6
    public function save(HitCounter $hit): void
13
    {
14 6
        if (!$hit->save()) {
15 3
            throw new \RuntimeException('Saving error.');
16
        }
17 3
    }
18
19
}