Skip to content

Commit

Permalink
Repair Lorem.php for code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
supgeek-rod committed Nov 15, 2023
1 parent ee0ec13 commit c622f53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Faker/Provider/zh_CN/Lorem.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public static function text($maxNbChars = 200)
$text = [];
$size = 0;

while ($size < $maxNbChars) {
while ($size <= $maxNbChars) {
$word = static::$type();
$text[] = $word;
$size += self::strlen($word);
Expand All @@ -267,7 +267,7 @@ public static function text($maxNbChars = 200)
array_pop($text);

if ($type === 'word') {
$text[count($text) - 1] .= '';
$text[] = '';
}

return implode('', $text);
Expand Down

0 comments on commit c622f53

Please sign in to comment.