| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 7 | public function pass(CommitMessage $msg): bool |
|
| 51 | { |
||
| 52 | 7 | $lineNr = 1; |
|
| 53 | 7 | foreach ($msg->getBodyLines() as $line) { |
|
| 54 | 4 | if (mb_strlen($line) > $this->maxLength) { |
|
| 55 | 2 | $this->hint .= PHP_EOL . 'Line ' . $lineNr . ' of your body exceeds the max line length'; |
|
| 56 | 2 | return false; |
|
| 57 | } |
||
| 58 | 3 | $lineNr++; |
|
| 59 | } |
||
| 60 | 5 | return true; |
|
| 61 | } |
||
| 63 |