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