Completed
Push — master ( 42ab41...f5b0ad )
by Tomasz
02:38
created

TranslateErrorException   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\Worker\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 TranslateErrorException 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 1
    public function __construct($commandData, $message = "", $code = 0, Exception $previous = null)
30
    {
31 1
        parent::__construct($message, $code, $previous);
32 1
        $this->commandData = $commandData;
33 1
    }
34
    
35
    /**
36
     * Get command data.
37
     * 
38
     * @return mixed
39
     */
40 1
    function getCommandData()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
41
    {
42 1
        return $this->commandData;
43
    }
44
}
45