Completed
Push — master ( 70c29b...7d604a )
by Tomasz
06:29
created

ServiceRescheduleWorker::execute()   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
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Gendoria\CommandQueueRabbitMqDriverBundle\Worker;
4
5
use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
6
use PhpAmqpLib\Message\AMQPMessage;
7
8
/**
9
 * "Dummy" class needed to create RabbitMQ reschedule queue.
10
 *
11
 * @author Tomasz Struczyński <[email protected]>
12
 */
13
class ServiceRescheduleWorker implements ConsumerInterface
14
{
15
    /**
16
     * Class constructor - does nothing.
17
     */
18 1
    public function __construct()
19
    {
20 1
    }
21
22
    /**
23
     * Process message, sending it back to queue.
24
     *
25
     * @param AMQPMessage $msg
26
     *
27
     * @return int Return self::MSG_REJECT_REQUEUE value to enforce message requeue.
28
     */
29 1
    public function execute(AMQPMessage $msg)
30
    {
31 1
        return self::MSG_REJECT_REQUEUE;
32
    }
33
}
34