Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Oct 16, 2023
1 parent d8482a8 commit 8a2c6a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Calculator/SvgTextSizeCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ private function computeTextWidth(
$maxLineWidth = $lineWidth = 0;

foreach ($characterList as $character) {
if ($character->toDecimal() === self::UNICODE_CODE_POINT_LINE_FEED) {
$maxLineWidth = max($maxLineWidth, $lineWidth);
if (self::UNICODE_CODE_POINT_LINE_FEED === $character->toDecimal()) {
$maxLineWidth = \max($maxLineWidth, $lineWidth);
$lineWidth = 0;
continue;
}

$lineWidth += $font->computeWidth($character, $fontSize);
}

return max($maxLineWidth, $lineWidth);
return \max($maxLineWidth, $lineWidth);
}
}

0 comments on commit 8a2c6a9

Please sign in to comment.