ValidationException::getInnerError()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
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