Skip to content

Commit 8cb3622

Browse files
committed
style: fix linting errors
1 parent c8b9259 commit 8cb3622

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

mago.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ empty_line_after_opening_tag = false
2828
default_plugins = true
2929
plugins = ["symfony", "php-unit"]
3030

31+
# Good rule but needs some work
32+
[[linter.rules]]
33+
name = "best-practices/literal-named-argument"
34+
level = "off"
35+
# level = "error"
36+
3137
# MAINTENABILITY
3238
[[linter.rules]]
3339
name = "maintainability/too-many-enum-cases"

src/Web/Analytics/StatsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
final readonly class StatsController
1717
{
1818
#[Get('/stats')]
19-
public function __invoke(Clock $clock): View
19+
public function __invoke(): View
2020
{
2121
$limit = 30;
2222

@@ -44,7 +44,7 @@ public function __invoke(Clock $clock): View
4444
packageDownloadsPerDay: new Chart(
4545
labels: $packageDownloadsPerDay->map(fn (PackageDownloadsPerDay $item) => $item->date->format('Y-m-d')),
4646
values: $packageDownloadsPerDay->map(fn (PackageDownloadsPerDay $item) => $item->total),
47-
min: $packageDownloadsPerDay->sortByCallback(fn (PackageDownloadsPerDay $a, PackageDownloadsPerDay $b) => $a->total)->first()->total,
47+
min: $packageDownloadsPerDay->sortByCallback(fn (PackageDownloadsPerDay $a, PackageDownloadsPerDay $_b) => $a->total)->first()->total,
4848
),
4949
);
5050
}

src/Web/Blog/BlogPost.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use function Tempest\uri;
99

10+
/**
11+
* @mago-expect maintainability/too-many-properties
12+
*/
1013
final class BlogPost
1114
{
1215
public string $slug;

src/Web/Documentation/PullDocumentationCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
use function Tempest\root_path;
1313
use function Tempest\Support\path;
1414

15-
final class PullDocumentationCommand
15+
final readonly class PullDocumentationCommand
1616
{
17-
private const CLONE_DIRECTORY = 'clone';
18-
private const DOCS_DIRECTORY = 'docs';
17+
private const string CLONE_DIRECTORY = 'clone';
18+
private const string DOCS_DIRECTORY = 'docs';
1919

2020
public function __construct(
21-
private readonly Console $console,
21+
private Console $console,
2222
) {}
2323

2424
#[ConsoleCommand('docs:pull')]

0 commit comments

Comments
 (0)