RedisETagGenerator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 2
1
<?php
2
namespace Kpicaza\RedisETagCache;
3
use Kpicaza\ETagCache\ETagGeneratorInterface;
4
use Kpicaza\RedisETagCache\Exception\EmptyETagException;
5
/**
6
 * Class RedisETagGenerator
7
 * @package Kpicaza\RedisETagCache
8
 */
9
class RedisETagGenerator implements ETagGeneratorInterface
10
{
11
    /**
12
     * @param $content
13
     * @return string
14
     */
15 3
    public function create($content)
16
    {
17 3
        if (empty($content)) {
18 1
            return;
19
        }
20
21 2
        return md5($content);
22
    }
23
}
24