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

ActiveMQSendAckCheckException   A

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 canNotSent() 0 4 1
1
<?php
2
3
namespace TonicHealthCheck\Check\ActiveMQ\SendReciveAck\Exception;
4
5
/**
6
 * Class ActiveMQSendAckCheckException.
7
 */
8
class ActiveMQSendAckCheckException extends ActiveMQSendReciveAckCheckException
9
{
10
    const EXCEPTION_NAME = 'ActiveMQSendAckCheck';
11
12
    const CODE_CAN_NOT_SENT = 4002;
13
    const TEXT_CAN_NOT_SENT = 'can\'t send message destination:%s body:%s error:%s';
14
15
    /**
16
     * @param string     $destination
17
     * @param string     $body
18
     * @param \Exception $e
19
     *
20
     * @return self
21
     */
22 1
    public static function canNotSent($destination, $body, \Exception $e)
23
    {
24 1
        return new self(sprintf(self::TEXT_CAN_NOT_SENT, $destination, $body, $e->getMessage()), self::CODE_CAN_NOT_SENT, $e);
25
    }
26
}
27