Skip to content

Commit 2aff723

Browse files
committed
Fix context generators
Signed-off-by: William Desportes <[email protected]>
1 parent 1908224 commit 2aff723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/ContextGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static function readWords(array $files)
186186
*
187187
* @return string
188188
*/
189-
public static function printWords($words, $spaces = 8, $line = 80)
189+
public static function printWords($words, $spaces = 8, $line = 140)
190190
{
191191
$typesCount = count($words);
192192
$ret = '';
@@ -202,7 +202,7 @@ public static function printWords($words, $spaces = 8, $line = 80)
202202
$ret .= str_repeat(' ', $spaces);
203203
}
204204
$ret .= sprintf('\'%s\' => %s, ', $word, $type);
205-
if (++$i === $count) {
205+
if (++$i === $count || ++$i > $count) {
206206
$ret .= "\n";
207207
$i = 0;
208208
}

0 commit comments

Comments
 (0)