Code Duplication    Length = 17-17 lines in 2 locations

src/Check/Elasticsearch/ElasticsearchCheckException.php 1 location

@@ 10-26 (lines=17) @@
7
/**
8
 * Class ElasticsearchCheckException.
9
 */
10
class ElasticsearchCheckException extends CheckException
11
{
12
    const EXCEPTION_NAME = 'ElasticsearchCheck';
13
14
    const CODE_INTERNAL_PROBLE = 5001;
15
    const TEXT_INTERNAL_PROBLE = 'Elasticsearch connect or GET problem: %s';
16
17
    /**
18
     * @param \Exception $e
19
     *
20
     * @return static
21
     */
22
    public static function internalGetProblem(\Exception $e)
23
    {
24
        return new static(sprintf(static::TEXT_INTERNAL_PROBLE, $e->getMessage()), static::CODE_INTERNAL_PROBLE, $e);
25
    }
26
}
27

src/Check/Redis/RedisCheckException.php 1 location

@@ 10-26 (lines=17) @@
7
/**
8
 * Class RedisCheckException.
9
 */
10
class RedisCheckException extends CheckException
11
{
12
    const EXCEPTION_NAME = 'RedisCheck';
13
14
    const CODE_INTERNAL_PROBLE = 3004;
15
    const TEXT_INTERNAL_PROBLE = 'Redis internal problem: %s';
16
17
    /**
18
     * @param \Exception $e
19
     *
20
     * @return static
21
     */
22
    public static function internalProblem(\Exception $e)
23
    {
24
        return new static(sprintf(static::TEXT_INTERNAL_PROBLE, $e->getMessage()), static::CODE_INTERNAL_PROBLE, $e);
25
    }
26
}
27