| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function parse() |
||
| 41 | { |
||
| 42 | $content = $this->content; |
||
| 43 | |||
| 44 | foreach (static::getTransformerSteps() as $step) { |
||
| 45 | $content = static::callTransformer($step, $content); |
||
| 46 | |||
| 47 | if($content === null) { |
||
| 48 | throw new InvalidFormat("Format is invalid. Failed at step: $step"); |
||
| 49 | } |
||
| 50 | |||
| 51 | if(empty($content)) { |
||
| 52 | return $content; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | return $content; |
||
|
|
|||
| 57 | } |
||
| 95 |