CursorParameterException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 32
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getColumn() 0 4 1
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