From e3c175e5fedd419933e2513b017c9a0426a21b65 Mon Sep 17 00:00:00 2001 From: Shift Date: Sun, 19 Feb 2023 16:19:02 +0000 Subject: [PATCH] Use Faker methods Accessing Faker properties was deprecated in Faker 1.14. --- database/factories/BitcoinEventFactory.php | 4 ++-- database/factories/BookCaseFactory.php | 26 +++++++++++----------- database/factories/CategoryFactory.php | 4 ++-- database/factories/CityFactory.php | 4 ++-- database/factories/CountryFactory.php | 4 ++-- database/factories/CourseFactory.php | 2 +- database/factories/LecturerFactory.php | 6 ++--- database/factories/LibraryFactory.php | 4 ++-- database/factories/LibraryItemsFactory.php | 4 ++-- database/factories/MeetupEventFactory.php | 6 ++--- database/factories/MeetupFactory.php | 4 ++-- database/factories/ParticipantFactory.php | 4 ++-- database/factories/PodcastFactory.php | 2 +- database/factories/RegistrationFactory.php | 2 +- database/factories/VenueFactory.php | 6 ++--- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/database/factories/BitcoinEventFactory.php b/database/factories/BitcoinEventFactory.php index 252b9682..08071072 100644 --- a/database/factories/BitcoinEventFactory.php +++ b/database/factories/BitcoinEventFactory.php @@ -27,8 +27,8 @@ class BitcoinEventFactory extends Factory 'from' => $this->faker->dateTime(), 'to' => $this->faker->dateTime(), 'title' => $this->faker->sentence(4), - 'description' => $this->faker->text, - 'link' => $this->faker->word, + 'description' => $this->faker->text(), + 'link' => $this->faker->word(), ]; } } diff --git a/database/factories/BookCaseFactory.php b/database/factories/BookCaseFactory.php index 535b5b00..47e79932 100644 --- a/database/factories/BookCaseFactory.php +++ b/database/factories/BookCaseFactory.php @@ -23,20 +23,20 @@ class BookCaseFactory extends Factory { return [ 'title' => $this->faker->sentence(4), - 'lat' => $this->faker->latitude, + 'lat' => $this->faker->latitude(), 'lon' => '{}', - 'address' => $this->faker->text, - 'type' => $this->faker->word, - 'open' => $this->faker->word, - 'comment' => $this->faker->text, - 'contact' => $this->faker->text, - 'bcz' => $this->faker->text, - 'digital' => $this->faker->boolean, - 'icontype' => $this->faker->word, - 'deactivated' => $this->faker->boolean, - 'deactreason' => $this->faker->word, - 'entrytype' => $this->faker->word, - 'homepage' => $this->faker->word, + 'address' => $this->faker->text(), + 'type' => $this->faker->word(), + 'open' => $this->faker->word(), + 'comment' => $this->faker->text(), + 'contact' => $this->faker->text(), + 'bcz' => $this->faker->text(), + 'digital' => $this->faker->boolean(), + 'icontype' => $this->faker->word(), + 'deactivated' => $this->faker->boolean(), + 'deactreason' => $this->faker->word(), + 'entrytype' => $this->faker->word(), + 'homepage' => $this->faker->word(), ]; } } diff --git a/database/factories/CategoryFactory.php b/database/factories/CategoryFactory.php index 5309bfde..6eb5f17c 100644 --- a/database/factories/CategoryFactory.php +++ b/database/factories/CategoryFactory.php @@ -22,8 +22,8 @@ class CategoryFactory extends Factory public function definition(): array { return [ - 'name' => $this->faker->name, - 'slug' => $this->faker->slug, + 'name' => $this->faker->name(), + 'slug' => $this->faker->slug(), ]; } } diff --git a/database/factories/CityFactory.php b/database/factories/CityFactory.php index 3e92b6bb..86f62218 100644 --- a/database/factories/CityFactory.php +++ b/database/factories/CityFactory.php @@ -24,8 +24,8 @@ class CityFactory extends Factory { return [ 'country_id' => Country::factory(), - 'name' => $this->faker->name, - 'slug' => $this->faker->slug, + 'name' => $this->faker->name(), + 'slug' => $this->faker->slug(), ]; } } diff --git a/database/factories/CountryFactory.php b/database/factories/CountryFactory.php index f4249596..f218fd7c 100644 --- a/database/factories/CountryFactory.php +++ b/database/factories/CountryFactory.php @@ -22,8 +22,8 @@ class CountryFactory extends Factory public function definition(): array { return [ - 'name' => $this->faker->name, - 'code' => $this->faker->word, + 'name' => $this->faker->name(), + 'code' => $this->faker->word(), ]; } } diff --git a/database/factories/CourseFactory.php b/database/factories/CourseFactory.php index a1c3f797..f12cb13d 100644 --- a/database/factories/CourseFactory.php +++ b/database/factories/CourseFactory.php @@ -24,7 +24,7 @@ class CourseFactory extends Factory { return [ 'lecturer_id' => Lecturer::factory(), - 'name' => $this->faker->name, + 'name' => $this->faker->name(), ]; } } diff --git a/database/factories/LecturerFactory.php b/database/factories/LecturerFactory.php index 50bbace3..1da18336 100644 --- a/database/factories/LecturerFactory.php +++ b/database/factories/LecturerFactory.php @@ -24,9 +24,9 @@ class LecturerFactory extends Factory { return [ 'team_id' => Team::factory(), - 'name' => $this->faker->name, - 'slug' => $this->faker->slug, - 'active' => $this->faker->boolean, + 'name' => $this->faker->name(), + 'slug' => $this->faker->slug(), + 'active' => $this->faker->boolean(), ]; } } diff --git a/database/factories/LibraryFactory.php b/database/factories/LibraryFactory.php index 3f774bf3..ff735bd4 100644 --- a/database/factories/LibraryFactory.php +++ b/database/factories/LibraryFactory.php @@ -22,8 +22,8 @@ class LibraryFactory extends Factory public function definition(): array { return [ - 'name' => $this->faker->name, - 'language_code' => $this->faker->word, + 'name' => $this->faker->name(), + 'language_code' => $this->faker->word(), ]; } } diff --git a/database/factories/LibraryItemsFactory.php b/database/factories/LibraryItemsFactory.php index 6ce32d5b..760da750 100644 --- a/database/factories/LibraryItemsFactory.php +++ b/database/factories/LibraryItemsFactory.php @@ -27,8 +27,8 @@ class LibraryItemsFactory extends Factory 'lecturer_id' => Lecturer::factory(), 'library_id' => Library::factory(), 'order_column' => $this->faker->randomNumber(), - 'type' => $this->faker->word, - 'value' => $this->faker->text, + 'type' => $this->faker->word(), + 'value' => $this->faker->text(), ]; } } diff --git a/database/factories/MeetupEventFactory.php b/database/factories/MeetupEventFactory.php index 76121be8..94dee0cc 100644 --- a/database/factories/MeetupEventFactory.php +++ b/database/factories/MeetupEventFactory.php @@ -27,9 +27,9 @@ class MeetupEventFactory extends Factory 'date' => $this->faker->date(), 'start' => $this->faker->time(), 'end' => $this->faker->time(), - 'location' => $this->faker->word, - 'description' => $this->faker->text, - 'link' => $this->faker->word, + 'location' => $this->faker->word(), + 'description' => $this->faker->text(), + 'link' => $this->faker->word(), ]; } } diff --git a/database/factories/MeetupFactory.php b/database/factories/MeetupFactory.php index c93daa11..6a150db7 100644 --- a/database/factories/MeetupFactory.php +++ b/database/factories/MeetupFactory.php @@ -24,8 +24,8 @@ class MeetupFactory extends Factory { return [ 'city_id' => City::factory(), - 'name' => $this->faker->name, - 'link' => $this->faker->word, + 'name' => $this->faker->name(), + 'link' => $this->faker->word(), ]; } } diff --git a/database/factories/ParticipantFactory.php b/database/factories/ParticipantFactory.php index d442914d..d61e66a1 100644 --- a/database/factories/ParticipantFactory.php +++ b/database/factories/ParticipantFactory.php @@ -22,8 +22,8 @@ class ParticipantFactory extends Factory public function definition(): array { return [ - 'first_name' => $this->faker->firstName, - 'last_name' => $this->faker->lastName, + 'first_name' => $this->faker->firstName(), + 'last_name' => $this->faker->lastName(), ]; } } diff --git a/database/factories/PodcastFactory.php b/database/factories/PodcastFactory.php index 31bf36b0..06c12657 100644 --- a/database/factories/PodcastFactory.php +++ b/database/factories/PodcastFactory.php @@ -23,7 +23,7 @@ class PodcastFactory extends Factory { return [ 'title' => $this->faker->sentence(4), - 'link' => $this->faker->word, + 'link' => $this->faker->word(), 'data' => '{}', ]; } diff --git a/database/factories/RegistrationFactory.php b/database/factories/RegistrationFactory.php index 6b55aae5..f2a76b9a 100644 --- a/database/factories/RegistrationFactory.php +++ b/database/factories/RegistrationFactory.php @@ -26,7 +26,7 @@ class RegistrationFactory extends Factory return [ 'event_id' => CourseEvent::factory(), 'participant_id' => Participant::factory(), - 'active' => $this->faker->boolean, + 'active' => $this->faker->boolean(), ]; } } diff --git a/database/factories/VenueFactory.php b/database/factories/VenueFactory.php index cf1da517..8362f397 100644 --- a/database/factories/VenueFactory.php +++ b/database/factories/VenueFactory.php @@ -24,9 +24,9 @@ class VenueFactory extends Factory { return [ 'city_id' => City::factory(), - 'name' => $this->faker->name, - 'slug' => $this->faker->slug, - 'street' => $this->faker->streetName, + 'name' => $this->faker->name(), + 'slug' => $this->faker->slug(), + 'street' => $this->faker->streetName(), ]; } }