| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __construct(array $details) |
||
| 25 | { |
||
| 26 | if (count($details) === 0) { |
||
| 27 | parent::__construct('Envelope validation failed'); |
||
| 28 | $details = []; |
||
| 29 | } elseif (count($details) === 1) { |
||
| 30 | parent::__construct($details[0]); |
||
| 31 | } else { |
||
| 32 | parent::__construct( |
||
| 33 | sprintf( |
||
| 34 | 'Envelope validation failed. %d asserts failed', |
||
| 35 | count($details) |
||
| 36 | ) |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->details = $details; |
||
| 41 | } |
||
| 42 | |||
| 51 |