QueueBeforeTranslateEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 42
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

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