Completed
Push — master ( 9e4cdb...1641ea )
by Alexandr
02:44
created

DatableResolveException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
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 30
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getData() 0 4 1
A setData() 0 4 1
1
<?php
2
/**
3
 * Date: 22.12.15
4
 *
5
 * @author Portey Vasil <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Exception;
9
10
use Youshido\GraphQL\Exception\Interfaces\DatableExceptionInterface;
11
12
class DatableResolveException extends \Exception implements DatableExceptionInterface
13
{
14
15
    /** @var  array */
16
    protected $data;
17
18 1
    public function __construct($message, $code = 0, $data = [])
19
    {
20 1
        parent::__construct($message, $code);
21
22 1
        $this->setData($data);
23 1
    }
24
25
    /**
26
     * @return array
27
     */
28 1
    public function getData()
29
    {
30 1
        return $this->data;
31
    }
32
33
    /**
34
     * @param array $data
35
     */
36 1
    public function setData($data)
37
    {
38 1
        $this->data = $data;
39 1
    }
40
41
}