| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 6 | public function extractBodyFromLine(string $line): string |
|
| 41 | { |
||
| 42 | 6 | if (substr($line, 0, $this->tagLength + 1) === $this->tag . ' ') { |
|
| 43 | 5 | return substr($line, $this->tagLength + 1); |
|
| 44 | } |
||
| 45 | |||
| 46 | 1 | throw new \InvalidArgumentException( |
|
| 47 | 1 | sprintf( |
|
| 48 | 1 | 'Line `%s` does not contain the tag %s', |
|
| 49 | 1 | $line, |
|
| 50 | 1 | $this->tag |
|
| 51 | ) |
||
| 52 | ); |
||
| 53 | } |
||
| 54 | |||
| 63 | } |