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
4 changes: 2 additions & 2 deletions app/Concerns/ProfileValidationRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ trait ProfileValidationRules
*
* @return array<string, array<int, Unique|ValidationRule|array<mixed>|string>>
*/
protected function profileRules(?int $userId = null): array
protected function profileRules(int|null $userId = null): array
{
return [
'name' => $this->nameRules(),
Expand All @@ -39,7 +39,7 @@ protected function nameRules(): array
*
* @return array<int, Unique|ValidationRule|array<mixed>|string>
*/
protected function emailRules(?int $userId = null): array
protected function emailRules(int|null $userId = null): array
{
return [
'required',
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function configureDefaults(): void
app()->isProduction(),
);

Password::defaults(fn (): ?Password => app()->isProduction()
Password::defaults(fn (): Password|null => app()->isProduction()
? Password::min(12)
->mixedCase()
->letters()
Expand Down
2 changes: 1 addition & 1 deletion database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class UserFactory extends Factory
/**
* The current password being used by the factory.
*/
protected static ?string $password;
protected static string|null $password;

/**
* Define the model's default state.
Expand Down
11 changes: 10 additions & 1 deletion pint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"preset": "laravel"
"preset": "laravel",
"rules": {
"declare_strict_types": true,
"nullable_type_declaration": {
"syntax": "union"
},
"ordered_types": {
"null_adjustment": "always_last"
}
}
}
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected function setUp(): void
$this->withoutVite();
}

protected function skipUnlessFortifyHas(string $feature, ?string $message = null): void
protected function skipUnlessFortifyHas(string $feature, string|null $message = null): void
{
if (! Features::enabled($feature)) {
$this->markTestSkipped($message ?? "Fortify feature [{$feature}] is not enabled.");
Expand Down