RedisWriteReadCheckException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A doesNotSave() 0 4 1
1
<?php
2
3
namespace TonicHealthCheck\Check\Redis\WriteReadDelete\Exception;
4
5
/**
6
 * Class RedisWriteReadCheckException.
7
 */
8
class RedisWriteReadCheckException extends RedisWRDCheckException
9
{
10
    const EXCEPTION_NAME = 'RedisWriteReadCheck';
11
12
    const CODE_DOES_NOT_SAVE = 3002;
13
    const TEXT_DOES_NOT_SAVE = 'Saved value beforeSave:%s set:%s current:%s';
14
15
    /**
16
     * @param string $beforeSaveValue
17
     * @param string $setValue
18
     * @param string $currentValue
19
     *
20
     * @return self
21
     */
22 2
    public static function doesNotSave($beforeSaveValue, $setValue, $currentValue)
23
    {
24 2
        return new self(sprintf(self::TEXT_DOES_NOT_SAVE, $beforeSaveValue, $setValue, $currentValue), self::CODE_DOES_NOT_SAVE);
25
    }
26
}
27