Nack::getCommand()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
namespace Disque\Command;
3
4
use Disque\Command\Response\IntResponse;
5
6
/**
7
 * Put the job(s) back to the queue immediately and increment the nack counter.
8
 *
9
 * The command should be used when the worker was not able to process a job and
10
 * wants the job to be put back into the queue in order to be processed again.
11
 *
12
 * It is very similar to ENQUEUE but it increments the job nacks counter
13
 * instead of the additional-deliveries counter.
14
 */
15
class Nack extends BaseCommand implements CommandInterface
16
{
17
    /**
18
     * @inheritdoc
19
     */
20
    protected $argumentsType = self::ARGUMENTS_TYPE_STRINGS;
21
22
    /**
23
     * @inheritdoc
24
     */
25
    protected $responseHandler = IntResponse::class;
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function getCommand()
31
    {
32
        return 'NACK';
33
    }
34
}