CommandJob::getDefaultExchange()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\TacticianQueue\Job;
6
7
use JMS\Serializer\Annotation as Serializer;
8
use Lamoda\QueueBundle\Job\AbstractJob;
9
10
final class CommandJob extends AbstractJob
11
{
12
    /**
13
     * @var object
14
     *
15
     * @Serializer\Type("tactician_command")
16
     */
17
    private $command;
18
19 1
    public function __construct($command, string $queue, string $exchange)
20
    {
21 1
        $this->command = $command;
22 1
        $this->queue = $queue;
23 1
        $this->exchange = $exchange;
24 1
    }
25
26
    /**
27
     * @return mixed
28
     */
29 1
    public function getCommand()
30
    {
31 1
        return $this->command;
32
    }
33
34
    /**
35
     * @deprecated Only for compatibility with current implementation in queue
36
     */
37
    public function getDefaultQueue(): string
38
    {
39
        return $this->queue;
40
    }
41
42
    /**
43
     * @deprecated Only for compatibility with current implementation in queue
44
     */
45
    public function getDefaultExchange(): string
46
    {
47
        return $this->exchange;
48
    }
49
}
50