Completed
Pull Request — master (#43)
by Harry
07:41 queued 05:29
created

NullAcknowledgementHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 36
c 1
b 0
f 0
wmc 3
lcom 0
cbo 1
ccs 4
cts 6
cp 0.6667
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A acknowledge() 0 7 1
A reject() 0 7 1
A flush() 0 4 1
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\Handler;
17
18
use Graze\Queue\Adapter\AdapterInterface;
19
use Graze\Queue\Message\MessageInterface;
20
21
class NullAcknowledgementHandler extends AbstractAcknowledgementHandler
22
{
23
    /**
24
     * @param MessageInterface $message
25
     * @param AdapterInterface $adapter
26
     * @param mixed            $result
27
     */
28 3
    protected function acknowledge(
29
        MessageInterface $message,
30
        AdapterInterface $adapter,
31
        $result = null
32
    ) {
33
        // Don't acknowledge.
34 3
    }
35
36
    /**
37
     * @param MessageInterface $message
38
     * @param AdapterInterface $adapter
39
     * @param mixed            $result
40
     */
41
    protected function reject(
42
        MessageInterface $message,
43
        AdapterInterface $adapter,
44
        $result = null
45
    ) {
46
        // Don't reject
47
    }
48
49
    /**
50
     * @param AdapterInterface $adapter
51
     */
52 3
    protected function flush(AdapterInterface $adapter)
53
    {
54
        // Nothing to flush.
55 3
    }
56
}
57