| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 4 | public function pass(CommitMessage $msg) |
|
| 39 | { |
||
| 40 | 4 | $lowerSubject = strtolower($msg->getSubject()); |
|
| 41 | $blackList = [ |
||
| 42 | 4 | 'uploaded', |
|
| 43 | 'updated', |
||
| 44 | 'added', |
||
| 45 | 'created', |
||
| 46 | ]; |
||
| 47 | 4 | foreach ($blackList as $term) { |
|
| 48 | 4 | if (strpos($lowerSubject, $term) !== false) { |
|
| 49 | 1 | $this->hint .= PHP_EOL . 'Invalid use of \'' . $term . '\''; |
|
| 50 | 4 | return false; |
|
| 51 | } |
||
| 52 | } |
||
| 53 | 3 | return true; |
|
| 54 | } |
||
| 55 | } |
||
| 56 |