CursorParameterException::getColumn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace mav3rick177\RapidPagination\Base\Exceptions\Query;
4
5
use mav3rick177\RapidPagination\Base\Contracts\Exceptions\Query\BadQueryException;
6
use mav3rick177\RapidPagination\Base\Exceptions\UnexpectedValueException;
7
8
/**
9
 * Class CursorParameterException
10
 */
11
class CursorParameterException extends UnexpectedValueException implements BadQueryException
12
{
13
    /**
14
     * @var string
15
     */
16
    protected $column;
17
18
    /**
19
     * CursorParameterException constructor.
20
     *
21
     * @param string                     $message
22
     * @param string                     $column   column which caused an exception.
23
     * @param int                        $code
24
     * @param null|\Exception|\Throwable $previous
25
     */
26
    public function __construct($message, $column, $code = 0, $previous = null)
27
    {
28
        parent::__construct($message, $code, $previous);
29
30
        $this->column = $column;
31
    }
32
33
    /**
34
     * Return column which caused an exception.
35
     *
36
     * @return string
37
     */
38
    public function getColumn()
39
    {
40
        return $this->column;
41
    }
42
}
43