| 1 | <?php |
||
| 11 | class InvalidInputForState extends Exception |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var Input |
||
| 15 | */ |
||
| 16 | private $input; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var State |
||
| 20 | */ |
||
| 21 | private $state; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Prepares exception message that includes the invalid input and state |
||
| 25 | * |
||
| 26 | * @param Input $input |
||
| 27 | * @param State $state |
||
| 28 | */ |
||
| 29 | 2 | public function __construct(Input $input, State $state) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * Returns the input that was attempted. |
||
| 39 | * |
||
| 40 | * @return Input |
||
| 41 | */ |
||
| 42 | 1 | public function getInput() : Input |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Returns what the object's current state was. |
||
| 49 | * |
||
| 50 | * @return State |
||
| 51 | */ |
||
| 52 | 1 | public function getState() : State |
|
| 56 | } |
||
| 57 |