Completed
Push — master ( 8fbfe7...114d8e )
by Tomasz
03:40
created

SerializedCommandData::getCommandClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Gendoria\CommandQueue\Serializer;
4
5
/**
6
 * Description of SerializedCommandData
7
 *
8
 * @author Tomasz Struczyński <[email protected]>
9
 */
10
class SerializedCommandData
11
{
12
    /**
13
     * Serialized command representation. In most cases - a string
14
     * 
15
     * @var mixed
16
     */
17
    private $serializedCommand;
18
    
19
    /**
20
     * Command class name.
21
     * 
22
     * @var string
23
     */
24
    private $commandClass;
25
    
26
    /**
27
     * Class consructor.
28
     * 
29
     * @param mixed $serializedCommand
30
     * @param string $commandClass
31
     */
32 2
    public function __construct($serializedCommand, $commandClass)
33
    {
34 2
        $this->serializedCommand = $serializedCommand;
35 2
        $this->commandClass = $commandClass;
36 2
    }
37
    
38
    /**
39
     * Get serialized command representation.
40
     * 
41
     * @return mixed
42
     */
43 2
    public function getSerializedCommand()
44
    {
45 2
        return $this->serializedCommand;
46
    }
47
48
    /**
49
     * Get command class.
50
     * 
51
     * @return string
52
     */
53 2
    public function getCommandClass()
54
    {
55 2
        return $this->commandClass;
56
    }
57
}
58