Completed
Push — master ( ca959b...d3c999 )
by Tomasz
06:06
created

QueueBeforeGetProcessorEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 32
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCommand() 0 4 1
1
<?php
2
3
namespace Gendoria\CommandQueueBundle\Event;
4
5
use Gendoria\CommandQueue\Command\CommandInterface;
6
use Gendoria\CommandQueue\Worker\WorkerInterface;
7
8
/**
9
 * Event raised, when queue worker is run.
10
 *
11
 * @author Tomasz Struczyński <[email protected]>
12
 */
13
class QueueBeforeGetProcessorEvent extends QueueWorkerRunEvent
14
{
15
    /**
16
     * Command data before translation.
17
     * 
18
     * @var CommandInterface
19
     */
20
    private $command;
21
    
22
    /**
23
     * Class constructor.
24
     *
25
     * @param WorkerInterface   $worker Worker processing this command.
26
     * @param CommandInterface  $command
27
     * @param string            $subsystem Subsystem name.
28
     */
29 3
    public function __construct(WorkerInterface $worker, CommandInterface $command, $subsystem = null)
30
    {
31 3
        parent::__construct($worker, $subsystem);
32 3
        $this->command = $command;
33 3
    }
34
    
35
    /**
36
     * Get command data before translation.
37
     * 
38
     * @return CommandInterface
39
     */
40 1
    public function getCommand()
41
    {
42 1
        return $this->command;
43
    }    
44
}
45