Skip to content

Commit 6945fe8

Browse files
committed
chore: apply mago formatting
1 parent b6e061e commit 6945fe8

30 files changed

+162
-83
lines changed

bun.lock

Lines changed: 92 additions & 28 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"require-dev": {
1414
"phpunit/phpunit": "^12.2.5",
1515
"symfony/var-dumper": "^7.3.1",
16-
"carthage-software/mago": "^0.25.0"
16+
"carthage-software/mago": "^0.26.1"
1717
},
1818
"autoload": {
1919
"psr-4": {
@@ -45,9 +45,10 @@
4545
"qa": [
4646
"composer mago:fmt",
4747
"composer phpunit",
48-
"composer mago:lint",
48+
"bun run build",
4949
"@php ./tempest static:generate",
50-
"@php ./tempest static:clean"
50+
"@php ./tempest static:clean",
51+
"rm -rf public/build"
5152
]
5253
},
5354
"minimum-stability": "dev",

composer.lock

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Highlight/Patterns/TempestViewCommentPattern.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ public function getPattern(): string
1515
return '(?<match>\{\{\-\-(.|\n)*?\-\-\}\})';
1616
}
1717

18+
#[\Override]
1819
public function getTokenType(): TokenTypeEnum
1920
{
2021
return TokenTypeEnum::COMMENT;
2122
}
22-
}
23+
}

src/Markdown/Alerts/AlertBlockRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use League\CommonMark\Renderer\HtmlRenderer;
88
use League\CommonMark\Renderer\NodeRendererInterface;
99
use League\CommonMark\Util\HtmlElement;
10-
1110
use Tempest\View\ViewRenderer;
11+
1212
use function Tempest\get;
1313
use function Tempest\view;
1414

src/Markdown/HandleParser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public function parse(InlineParserContext $inlineContext): bool
3232
[$platform, $handle, $text] = $inlineContext->getSubMatches() + [null, null, null];
3333

3434
$url = match ($platform) {
35-
'bluesky', 'bsky' => "https://bsky.app/profile/$handle",
36-
'gh', 'github' => "https://github.com/$handle",
37-
'x', 'twitter' => "https://x.com/$handle",
38-
default => throw new \RuntimeException("Unknown platform: $platform"),
35+
'bluesky', 'bsky' => "https://bsky.app/profile/{$handle}",
36+
'gh', 'github' => "https://github.com/{$handle}",
37+
'x', 'twitter' => "https://x.com/{$handle}",
38+
default => throw new \RuntimeException("Unknown platform: {$platform}"),
3939
};
4040

4141
$inlineContext->getContainer()->appendChild(

src/Markdown/MarkdownPost.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ public function getSubChapters(): array
5555

5656
return $subChapters;
5757
}
58-
}
58+
}

src/Markdown/TempestPackageParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function parse(InlineParserContext $inlineContext): bool
4141
};
4242

4343
$link = new Link($url);
44-
$link->appendChild(new Code("tempest/$package"));
44+
$link->appendChild(new Code("tempest/{$package}"));
4545
$inlineContext->getContainer()->appendChild($link);
4646

4747
return true;

src/Web/Blog/BlogIndexer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function __construct(
2020
private MarkdownConverter $markdown,
2121
) {}
2222

23+
#[\Override]
2324
public function index(): ImmutableArray
2425
{
2526
return arr(glob(__DIR__ . '/articles/*.md'))

src/Web/Blog/BlogPostTag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ enum BlogPostTag: string
1010

1111
public function getStyle(): string
1212
{
13-
return match($this) {
13+
return match ($this) {
1414
self::THOUGHTS => 'ring-amber-200 text-amber-400',
1515
self::RELEASE => 'ring-blue-200 text-blue-400',
1616
self::TUTORIAL => 'ring-teal-200 text-teal-400',
1717
};
1818
}
19-
}
19+
}

0 commit comments

Comments
 (0)