ValidationException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getInnerError() 0 1 1
A __construct() 0 5 1
1
<?php
2
namespace MetaHydrator\Exception;
3
4
/**
5
 * An exception describing why some data was considered invalid.
6
 *
7
 * Class ValidationException
8
 * @package MetaHydrator\Exception
9
 */
10
class ValidationException extends \Exception
11
{
12
    /** @var mixed */
13
    private $innerError;
14
    /** @return mixed */
15
    public function getInnerError() { return $this->innerError; }
16
17
    /**
18
     * ValidationException constructor.
19
     * @param mixed $innerError
20
     * @param string $message
21
     * @param int $code
22
     */
23
    public function __construct($innerError, $message = "", $code = 0)
24
    {
25
        parent::__construct($message, $code, null);
26
        $this->innerError = $innerError;
27
    }
28
}
29