@@ -103,8 +103,9 @@ |
||
| 103 | 103 | protected function getWordsHavingOccurrences($number) { |
| 104 | 104 | $result = []; |
| 105 | 105 | foreach ($this->list as $word) { |
| 106 | - if ($word->occurrences() == $number) |
|
| 107 | - $result[] = $word; |
|
| 106 | + if ($word->occurrences() == $number) { |
|
| 107 | + $result[] = $word; |
|
| 108 | + } |
|
| 108 | 109 | } |
| 109 | 110 | usort($result, function(Word $w1, Word $w2) { |
| 110 | 111 | return strcmp($w1->value(), $w2->value()); |