| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 2 | public function checkBadWords($stopOnFirst = false) |
|
| 49 | { |
||
| 50 | 2 | $result = array(); |
|
| 51 | 2 | foreach ($this->words as &$word) { |
|
| 52 | 2 | if ($word->isBadWord()) { |
|
| 53 | 1 | $result[$word->original] = $word->normalized(); |
|
| 54 | 1 | if ($stopOnFirst) { |
|
| 55 | 1 | break; |
|
| 56 | } |
||
| 57 | 1 | } |
|
| 58 | 2 | } |
|
| 59 | 2 | return $result; |
|
| 60 | } |
||
| 62 |