| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 6 | public function __construct(ValidationResult $validation) |
|
| 20 | { |
||
| 21 | 6 | if (!$validation->failed()) { |
|
| 22 | 1 | throw new UnexpectedValueException("Validation didn't fail, no exception should be thrown"); |
|
| 23 | } |
||
| 24 | |||
| 25 | 5 | parent::__construct("Validation failed;\n * " . join("\n * ", $validation->getErrors())); |
|
| 26 | |||
| 27 | 5 | $this->validationResult = $validation; |
|
| 28 | } |
||
| 67 |