IllegalOptionException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 44
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0
ccs 9
cts 9
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getOptionName() 0 4 1
A getOptionValue() 0 4 1
1
<?php
2
3
namespace MiniGame\Exceptions;
4
5
class IllegalOptionException extends \InvalidArgumentException
6
{
7
    /**
8
     * @var $string
9
     */
10
    private $optionName;
11
12
    /**
13
     * @var mixed
14
     */
15
    private $optionValue;
16
17
    /**
18
     * Constructor
19
     *
20
     * @param string     $message
21
     * @param int        $optionName
22
     * @param mixed      $optionValue
23
     * @param int        $code
24
     * @param \Exception $previous
25
     */
26 3
    public function __construct($message, $optionName, $optionValue, $code = 0, \Exception $previous = null)
27
    {
28 3
        $this->optionName = $optionName;
29 3
        $this->optionValue = $optionValue;
30 3
        parent::__construct($message, $code, $previous);
31 3
    }
32
33
    /**
34
     * @return string
35
     */
36 3
    public function getOptionName()
37
    {
38 3
        return $this->optionName;
39
    }
40
41
    /**
42
     * @return mixed
43
     */
44 3
    public function getOptionValue()
45
    {
46 3
        return $this->optionValue;
47
    }
48
}
49