Passed
Pull Request — master (#48)
by Harry
04:05
created

FailedRejectionException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 4
dl 0
loc 7
ccs 2
cts 2
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of graze/queue.
5
 *
6
 * Copyright (c) 2015 Nature Delivered Ltd. <https://www.graze.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @license https://github.com/graze/queue/blob/master/LICENSE MIT
12
 *
13
 * @link    https://github.com/graze/queue
14
 */
15
16
namespace Graze\Queue\Adapter\Exception;
17
18
use Exception;
19
use Graze\Queue\Adapter\AdapterInterface;
20
use Graze\Queue\Message\MessageInterface;
21
22
/**
23
 * Exception to throw when a {@see \Graze\Queue\Handler} is unable to reject a message.
24
 */
25
class FailedRejectionException extends AdapterException
26
{
27
    /**
28
     * @param AdapterInterface   $adapter
29
     * @param MessageInterface[] $messages
30
     * @param array              $debug
31
     * @param Exception          $previous
32
     */
33 6
    public function __construct(
34
        AdapterInterface $adapter,
35
        array $messages,
36
        array $debug = [],
37
        Exception $previous = null
38
    ) {
39 6
        parent::__construct('Failed to reject the messages', $adapter, $messages, $debug, $previous);
40 6
    }
41
}
42