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

SerializedCommandData   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSerializedCommand() 0 4 1
A getCommandClass() 0 4 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