Passed
Pull Request — develop_3.0 (#510)
by Adrien
02:39
created

InvalidValueException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getInvalidValue() 0 4 1
1
<?php
2
3
namespace Box\Spout\Reader\Exception;
4
5
use Throwable;
6
7
/**
8
 * Class InvalidValueException
9
 */
10
class InvalidValueException extends ReaderException
11
{
12
    /** @var mixed */
13
    private $invalidValue;
14
15
    /**
16
     * @param mixed $invalidValue
17
     * @param string $message
18
     * @param int $code
19
     * @param Throwable|null $previous
20
     */
21 6
    public function __construct($invalidValue, $message = '', $code = 0, Throwable $previous = null)
22
    {
23 6
        $this->invalidValue = $invalidValue;
24 6
        parent::__construct($message, $code, $previous);
25 6
    }
26
27
    /**
28
     * @return mixed
29
     */
30 2
    public function getInvalidValue()
31
    {
32 2
        return $this->invalidValue;
33
    }
34
}
35