Completed
Push — master ( 67a509...8ae834 )
by Tomasz
02:42
created

UnserializeErrorException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 33
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 getCommandData() 0 4 1
1
<?php
2
3
namespace Gendoria\CommandQueue\Serializer\Exception;
4
5
use Exception;
6
7
/**
8
 * Exception thrown, when command translation has been unsuccessfull.
9
 *
10
 * @author Tomasz Struczyński <[email protected]>
11
 */
12
class UnserializeErrorException extends Exception
13
{
14
    /**
15
     * Command data.
16
     * 
17
     * @var mixed
18
     */
19
    private $commandData;
20
    
21
    /**
22
     * Class constructor.
23
     * 
24
     * @param mixed $commandData
25
     * @param string $message
26
     * @param integer $code
27
     * @param Exception $previous
28
     */
29 4
    public function __construct($commandData, $message = "", $code = 0, Exception $previous = null)
30
    {
31 4
        parent::__construct($message, $code, $previous);
32 4
        $this->commandData = $commandData;
33 4
    }
34
    
35
    /**
36
     * Get command data.
37
     * 
38
     * @return mixed
39
     */
40 1
    public function getCommandData()
41
    {
42 1
        return $this->commandData;
43
    }
44
}
45