Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/FontFace.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ final class FontFace
private const DEFAULT_UNITS_PER_EM = 1000;

public function __construct(
public readonly int | null $unitsPerEm = self::DEFAULT_UNITS_PER_EM,
) {
}
public readonly ?int $unitsPerEm = self::DEFAULT_UNITS_PER_EM,
) {}
}
5 changes: 2 additions & 3 deletions src/FontList.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ final class FontList
*/
private function __construct(
private readonly array $fontList,
) {
}
) {}

/**
* @param list<Font> $fontList
Expand All @@ -38,7 +37,7 @@ public static function of(

public static function ofFile(
string $filePath,
SvgFontFileParserInterface $fontFileParser = null,
?SvgFontFileParserInterface $fontFileParser = null,
): self {
if ($fontFileParser === null) {
$fontFileParser = new SimpleXmlSvgFontFileParser();
Expand Down
4 changes: 2 additions & 2 deletions src/Glyph.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ final class Glyph
{
public function __construct(
public readonly Character $character,
public readonly string | null $name = null,
public readonly int | null $horizontalAdvance = null,
public readonly ?string $name = null,
public readonly ?int $horizontalAdvance = null,
) {
if ($horizontalAdvance !== null && $horizontalAdvance < 0) {
throw new \InvalidArgumentException(
Expand Down
5 changes: 2 additions & 3 deletions src/MissingGlyph.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
final class MissingGlyph
{
public function __construct(
public readonly int | null $horizontalAdvance = null,
) {
}
public readonly ?int $horizontalAdvance = null,
) {}
}