Completed
Push — master ( 451433...4e2c90 )
by Dmitry
05:05
created

ActiveMQReceiveAckCheckException::canNotReceive()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
namespace TonicHealthCheck\Check\ActiveMQ\SendReciveAck\Exception;
4
5
/**
6
 * Class ActiveMQReceiveAckCheckException.
7
 */
8
class ActiveMQReceiveAckCheckException extends ActiveMQSendReciveAckCheckException
9
{
10
    const EXCEPTION_NAME = 'ActiveMQReceiveAckCheck';
11
12
    const CODE_CAN_NOT_RECIVE = 4003;
13
    const TEXT_CAN_NOT_RECIVE = 'can\'t recive message destination:%s error:%s';
14
15
    /**
16
     * @param string     $destination
17
     * @param \Exception $e
18
     *
19
     * @return ActiveMQReceiveAckCheckException
20
     */
21 2
    public static function canNotReceive($destination, \Exception $e)
22
    {
23 2
        return new self(sprintf(self::TEXT_CAN_NOT_RECIVE, $destination, $e->getMessage()), self::CODE_CAN_NOT_RECIVE, $e);
24
    }
25
}
26