Completed
Push — master ( 348990...cde96e )
by Agel_Nash
03:07
created

QueryException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 25
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setQuery() 0 5 1
A __construct() 0 5 1
A getQuery() 0 3 1
1
<?php namespace AgelxNash\Modx\Evo\Database\Exceptions;
2
3
use Throwable;
4
5
class QueryException extends Exception
6
{
7
    protected $query = '';
8
    /**
9
     * @var string
10
     */
11
    protected $code;
12
13 4
    public function __construct($message = "", $code = 0, Throwable $previous = null)
14
    {
15 4
        parent::__construct($message, (int)$code, $previous);
16
17 4
        $this->code = $code;
18 4
    }
19
20 4
    public function setQuery($query) : self
21
    {
22 4
        $this->query = $query;
23
24 4
        return $this;
25
    }
26
27 2
    public function getQuery() : string
28
    {
29 2
        return $this->query;
30
    }
31
}
32