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
17 changes: 5 additions & 12 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class UserFactory extends Factory
public function definition(): array
{
return [
'firstname' => fake()->unique()->firstName(),
'lastname' => fake()->unique()->lastName(),
'email' => fake()->unique()->safeEmail(),
'firstname' => Str::uuid()->toString(),
'lastname' => Str::uuid()->toString(),
'email' => Str::uuid()->toString() . '@example.com',
'email_verified_at' => now(),
'password' => 'password',
'institution' => fake()->unique()->company(),
'password' => Str::uuid()->toString(),
'institution' => Str::uuid()->toString(),
'remember_token' => Str::random(10),
'admin' => false,
];
Expand All @@ -50,13 +50,6 @@ public function unverified(): static
]);
}

public function normalUser(): static
{
return $this->state(fn (array $attributes) => [
'admin' => false,
]);
}

public function adminUser(): static
{
return $this->state(fn (array $attributes) => [
Expand Down
2 changes: 1 addition & 1 deletion database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DatabaseSeeder extends Seeder
public function run(): void
{
$this->createAdminUser();
User::factory(1000)->normalUser()->create();
User::factory(1000)->create();

$this->createPublicProject();
$this->createTrilinosProject();
Expand Down
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -22365,12 +22365,6 @@ parameters:
count: 1
path: config/session.php

-
rawMessage: 'Method Database\Factories\UserFactory::definition() throws checked exception OverflowException but it''s missing from the PHPDoc @throws tag.'
identifier: missingType.checkedException
count: 4
path: database/factories/UserFactory.php

-
rawMessage: 'Only booleans are allowed in &&, string given on the left side.'
identifier: booleanAnd.leftNotBoolean
Expand Down