| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 5 | public function __construct( array $parsers, $format ) { |
|
| 37 | 5 | if ( empty( $parsers ) ) { |
|
| 38 | 1 | throw new InvalidArgumentException( '$parsers must be a non-empty array' ); |
|
| 39 | } |
||
| 40 | |||
| 41 | 4 | if ( !is_string( $format ) || $format === '' ) { |
|
| 42 | 2 | throw new InvalidArgumentException( '$format must be a non-empty string' ); |
|
| 43 | } |
||
| 44 | |||
| 45 | 2 | $this->parsers = $parsers; |
|
| 46 | 2 | $this->format = $format; |
|
| 47 | 2 | } |
|
| 48 | |||
| 72 |