Passed
Push — master ( 3d4557...4c2a8d )
by Hannes
01:54
created

InvalidInputException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 3
c 1
b 1
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace hanneskod\readmetester\Exception;
6
7
use hanneskod\readmetester\Exception;
8
use hanneskod\readmetester\Compiler\InputInterface;
9
10
final class InvalidInputException extends \RuntimeException implements Exception
11
{
12
    private InputInterface $input;
13
    private string $verboseMessage;
14
15
    public function __construct(string $message, InputInterface $input, string $verboseMessage = '')
16
    {
17
        parent::__construct($message);
18
        $this->input = $input;
19
        $this->verboseMessage = $verboseMessage;
20
    }
21
22
    public function getInput(): InputInterface
23
    {
24
        return $this->input;
25
    }
26
27
    public function getVerboseMessage(): string
28
    {
29
        return $this->verboseMessage;
30
    }
31
}
32