Code

< 40 %
40-60 %
> 60 %
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