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

InvalidInputException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 1
f 0
dl 0
loc 20
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getVerboseMessage() 0 3 1
A getInput() 0 3 1
A __construct() 0 5 1
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