Skip to content

Commit a010f53

Browse files
style: fix linting and formatting
1 parent 9c99715 commit a010f53

File tree

5 files changed

+25
-18
lines changed

5 files changed

+25
-18
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"require-dev": {
4141
"phpunit/phpunit": "^11.5.15",
42-
"carthage-software/mago": "1.0.0-beta.7"
42+
"carthage-software/mago": "1.0.0-beta.8"
4343
},
4444
"minimum-stability": "dev",
4545
"config": {

composer.lock

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

mago.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ interface-name = { enabled = false}
2929
cyclomatic-complexity = { threshold = 18 }
3030

3131
[analyzer]
32+
excludes = ["tests"]
3233
find-unused-definitions = true
3334
find-unused-expressions = false
3435
analyze-dead-code = false

src/ManifestVersionResolver.php

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace NeoIsRecursive\Inertia;
66

77
use NeoIsRecursive\Inertia\Contracts\InertiaVersionResolver;
8+
use Override;
89
use Tempest\Container\Container;
910

1011
use function Tempest\root_path;
@@ -13,20 +14,26 @@
1314
{
1415
public function __construct(
1516
public ?string $manifestPath = null,
16-
) {
17-
}
17+
) {}
1818

19+
#[Override]
1920
public function resolve(Container $container): string
2021
{
2122
$manifestPath = $this->manifestPath ?? root_path('/public/build/manifest.json'); // @mago-expect best-practices/literal-named-argument
2223

23-
if (file_exists($manifestPath)) {
24-
return hash_file(
25-
algo: 'xxh128',
26-
filename: $manifestPath,
27-
);
24+
if (!file_exists($manifestPath)) {
25+
return '';
26+
}
27+
28+
$hash = hash_file(
29+
algo: 'xxh128',
30+
filename: $manifestPath,
31+
);
32+
33+
if (!$hash) {
34+
return '';
2835
}
2936

30-
return '';
37+
return $hash;
3138
}
3239
}

src/PageData.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public function __construct(
1818
public bool $encryptHistory,
1919
public ?array $propKeysToDefer = null,
2020
public ?array $propsKeysToMerge = null,
21-
) {
22-
}
21+
) {}
2322

2423
public function toArray(): array
2524
{

0 commit comments

Comments
 (0)