mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Update deprecated faker calls
This commit is contained in:
parent
582c3b987b
commit
d9c1a548f1
|
@ -37,7 +37,7 @@ class AssetMaintenanceFactory extends Factory
|
|||
'asset_id' => Asset::factory(),
|
||||
'supplier_id' => Supplier::factory(),
|
||||
'asset_maintenance_type' => $this->faker->randomElement(['maintenance', 'repair', 'upgrade']),
|
||||
'title' => $this->faker->sentence,
|
||||
'title' => $this->faker->sentence(),
|
||||
'start_date' => $this->faker->date(),
|
||||
'is_warranty' => $this->faker->boolean(),
|
||||
'notes' => $this->faker->paragraph(),
|
||||
|
|
|
@ -36,7 +36,7 @@ class ComponentFactory extends Factory
|
|||
'name' => $this->faker->text(20),
|
||||
'category_id' => Category::factory(),
|
||||
'location_id' => Location::factory(),
|
||||
'serial' => $this->faker->uuid,
|
||||
'serial' => $this->faker->uuid(),
|
||||
'qty' => $this->faker->numberBetween(3, 10),
|
||||
'order_number' => $this->faker->numberBetween(1000000, 50000000),
|
||||
'purchase_date' => $this->faker->dateTime()->format('Y-m-d'),
|
||||
|
|
|
@ -21,7 +21,7 @@ class CustomFieldFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->catchPhrase,
|
||||
'name' => $this->faker->catchPhrase(),
|
||||
'format' => '',
|
||||
'element' => 'text',
|
||||
];
|
||||
|
|
|
@ -21,7 +21,7 @@ class CustomFieldsetFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->catchPhrase,
|
||||
'name' => $this->faker->catchPhrase(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class GroupFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'name' => $this->faker->name(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,9 +46,9 @@ class LicenseFactory extends Factory
|
|||
'user_id' => function () {
|
||||
return User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin();
|
||||
},
|
||||
'name' => $this->faker->name,
|
||||
'license_email' => $this->faker->safeEmail,
|
||||
'serial' => $this->faker->uuid,
|
||||
'name' => $this->faker->name(),
|
||||
'license_email' => $this->faker->safeEmail(),
|
||||
'serial' => $this->faker->uuid(),
|
||||
'notes' => 'Created by DB seeder',
|
||||
'seats' => $this->faker->numberBetween(1, 10),
|
||||
'purchase_date' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get())->format('Y-m-d'),
|
||||
|
|
|
@ -44,12 +44,12 @@ class SettingFactory extends Factory
|
|||
return User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin();
|
||||
},
|
||||
'per_page' => 20,
|
||||
'site_name' => $this->faker->sentence,
|
||||
'site_name' => $this->faker->sentence(),
|
||||
'auto_increment_assets' => false,
|
||||
'alert_email' => $this->faker->safeEmail(),
|
||||
'alerts_enabled' => true,
|
||||
'brand' => 1,
|
||||
'default_currency' => $this->faker->currencyCode,
|
||||
'default_currency' => $this->faker->currencyCode(),
|
||||
'locale' => 'en',
|
||||
'pwd_secure_min' => 10, // Match web setup
|
||||
'email_domain' => 'test.com',
|
||||
|
|
|
@ -23,7 +23,7 @@ class StatuslabelFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->sentence,
|
||||
'name' => $this->faker->sentence(),
|
||||
'created_at' => $this->faker->dateTime(),
|
||||
'updated_at' => $this->faker->dateTime(),
|
||||
'user_id' => function () {
|
||||
|
@ -41,7 +41,7 @@ class StatuslabelFactory extends Factory
|
|||
{
|
||||
return $this->state(function () {
|
||||
return [
|
||||
'notes' => $this->faker->sentence,
|
||||
'notes' => $this->faker->sentence(),
|
||||
'deployable' => 1,
|
||||
'default_label' => 1,
|
||||
];
|
||||
|
@ -52,7 +52,7 @@ class StatuslabelFactory extends Factory
|
|||
{
|
||||
return $this->state(function () {
|
||||
return [
|
||||
'notes' => $this->faker->sentence,
|
||||
'notes' => $this->faker->sentence(),
|
||||
'pending' => 1,
|
||||
'default_label' => 1,
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue