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 e401f7e commit 3c05812
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/Calculator/SvgFont.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace PUGX\Poser\Calculator;

use XMLReader;

/**
* @author Anton Komarev <[email protected]>
*/
Expand Down Expand Up @@ -80,6 +78,7 @@ public static function fromFile(
$codePoint = $codePoints[0];

$glyphs[$codePoint] = new \stdClass();

$glyphHorizAdvX = $xml->getAttribute('horiz-adv-x');

if (empty($glyphHorizAdvX)) {
Expand All @@ -90,7 +89,7 @@ public static function fromFile(

$glyphs[$codePoint]->d = $xml->getAttribute('d');

if ($codePoint === self::UNICODE_CODE_POINT_M_LOWERCASE) {
if (self::UNICODE_CODE_POINT_M_LOWERCASE === $codePoint) {
$glyphSpacingHorizAdvX = $glyphs[$codePoint]->horizAdvX;
}
}
Expand All @@ -115,7 +114,7 @@ public function computeWidth(

$glyphAdvX = $this->getGlyphAdvX($codePoint);

$glyphWidth = $glyphAdvX * $size;
$glyphWidth = $glyphAdvX * $size;
$glyphSpacingWidth = $this->glyphSpacingAdvX * $glyphSpacing * $size;

return $glyphWidth + $glyphSpacingWidth;
Expand Down
2 changes: 0 additions & 2 deletions src/Calculator/SvgTextSizeCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace PUGX\Poser\Calculator;

use PUGX\Poser\Calculator\TextSizeCalculatorInterface;

/**
* @author Anton Komarev <[email protected]>
*/
Expand Down

0 comments on commit 3c05812

Please sign in to comment.