Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 0 |
1 | <?php |
||
55 | 2 | public function parse( $value ) { |
|
56 | 2 | foreach ( $this->parsers as $parser ) { |
|
57 | try { |
||
58 | 2 | return $parser->parse( $value ); |
|
59 | 1 | } catch ( ParseException $ex ) { |
|
60 | 1 | continue; |
|
61 | } |
||
62 | } |
||
63 | |||
64 | 1 | throw new ParseException( |
|
65 | 1 | 'The value is not recognized by the configured parsers', |
|
66 | $value, |
||
67 | 1 | $this->format |
|
68 | ); |
||
69 | } |
||
70 | |||
72 |