[10.x] Uses PHP Native Type Declarations 🐘 (#6010)
* Adds basic typing around method's arguments and return types * Adds missing `closure` type * Adds typing on tests * Fixes `RedirectIfAuthenticated` * Fixes `Authenticate` * Improves `RedirectIfAuthenticated` types * Fixes user factory `unverified` return type
This commit is contained in:
@@ -15,7 +15,7 @@ class UserFactory extends Factory
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
@@ -29,9 +29,9 @@ class UserFactory extends Factory
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*
|
||||
* @return static
|
||||
* @return $this
|
||||
*/
|
||||
public function unverified()
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
|
||||
Reference in New Issue
Block a user