Skip to content

Commit

Permalink
Code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Komarev committed Oct 11, 2023
1 parent 6cbdd46 commit e401f7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Calculator/SvgTextSizeCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function calculateWidth(string $text, int $size = self::TEXT_SIZE): float
$lineWidth = 0;

foreach ($textUnicode as $unicodeCodePoint) {
if ($unicodeCodePoint === self::UNICODE_CODE_POINT_LINE_FEED) {
if (self::UNICODE_CODE_POINT_LINE_FEED === $unicodeCodePoint) {
$width = \max($width, $lineWidth);
$lineWidth = 0;
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/Calculator/TextUnicodeConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Anton Komarev <[email protected]>
*/
final class TextUnicodeConverter
class TextUnicodeConverter
{
/**
* Converts UTF-8 encoded string and returns unicode code points for every character.
Expand All @@ -39,7 +39,7 @@ public static function convertTextToCodePoints(
$values[] = $thisValue;

if (\count($values) === $lookingFor) {
$number = ($lookingFor === 3)
$number = (3 === $lookingFor)
? (($values[0] % 16) * 4096) + (($values[1] % 64) * 64) + ($values[2] % 64)
: (($values[0] % 32) * 64) + ($values[1] % 64);

Expand Down

0 comments on commit e401f7e

Please sign in to comment.