Code Duplication    Length = 17-17 lines in 2 locations

src/Check/ActiveMQ/ActiveMQCheckException.php 1 location

@@ 10-26 (lines=17) @@
7
/**
8
 * Class ActiveMQCheckException.
9
 */
10
class ActiveMQCheckException extends CheckException
11
{
12
    const EXCEPTION_NAME = 'ActiveMQCheck';
13
14
    const CODE_INTERNAL_PROBLE = 4004;
15
    const TEXT_INTERNAL_PROBLE = 'ActiveMQ 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

src/Check/ActiveMQ/Connect/ActiveMQConnectCheckException.php 1 location

@@ 10-26 (lines=17) @@
7
/**
8
 * Class ActiveMQConnectCheckException.
9
 */
10
class ActiveMQConnectCheckException extends ActiveMQCheckException
11
{
12
    const EXCEPTION_NAME = 'ActiveMQConnectCheck';
13
14
    const CODE_CONNECT_PROBLE = 4001;
15
    const TEXT_CONNECT_PROBLE = 'ActiveMQ connect problem: %s';
16
17
    /**
18
     * @param \Exception $e
19
     *
20
     * @return self
21
     */
22
    public static function connectProblem(\Exception $e)
23
    {
24
        return new self(sprintf(self::TEXT_CONNECT_PROBLE, $e->getMessage()), self::CODE_CONNECT_PROBLE, $e);
25
    }
26
}
27