CommandJob   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 63.64%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 40
ccs 7
cts 11
cp 0.6364
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getCommand() 0 4 1
A getDefaultQueue() 0 4 1
A getDefaultExchange() 0 4 1
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