Validation   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getVar() 0 3 1
A __construct() 0 9 1
1
<?php
2
3
namespace kartavik\Support\Exception;
4
5
use kartavik\Support\Exception;
6
7
/**
8
 * Class Validation
9
 * @package kartavik\Support\Exception
10
 */
11
class Validation extends \RuntimeException implements Exception
12
{
13
    protected $var;
14
15
    public function __construct(
16
        $var = null,
17
        string $message = "",
18
        int $code = 0,
19
        \Throwable $previous = null
20
    ) {
21
        $this->var = $var;
22
23
        parent::__construct($message, $code, $previous);
24
    }
25
26
    public function getVar()
27
    {
28
        return $this->var;
29
    }
30
}
31