From 1fd574779bf9a8f060c84309bef3909ffcf869b7 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 20 Mar 2023 11:39:27 -0700 Subject: [PATCH] Remove unneeded or outdated comments and update imports --- database/factories/AccessoryFactory.php | 12 +--- database/factories/ActionlogFactory.php | 9 --- database/factories/AssetFactory.php | 12 ---- .../factories/AssetMaintenanceFactory.php | 14 +--- database/factories/AssetModelFactory.php | 64 +------------------ database/factories/CategoryFactory.php | 11 +--- database/factories/CompanyFactory.php | 19 +----- database/factories/ComponentFactory.php | 12 +--- database/factories/ConsumableFactory.php | 12 +--- database/factories/CustomFieldFactory.php | 3 +- database/factories/CustomFieldsetFactory.php | 3 +- database/factories/DepartmentFactory.php | 12 +--- database/factories/DepreciationFactory.php | 12 +--- database/factories/GroupFactory.php | 21 +----- database/factories/LicenseFactory.php | 22 +------ database/factories/ManufacturerFactory.php | 34 +--------- database/factories/SettingFactory.php | 21 +----- database/factories/SupplierFactory.php | 19 +----- 18 files changed, 29 insertions(+), 283 deletions(-) diff --git a/database/factories/AccessoryFactory.php b/database/factories/AccessoryFactory.php index cca7297537..124a72c4a7 100644 --- a/database/factories/AccessoryFactory.php +++ b/database/factories/AccessoryFactory.php @@ -2,6 +2,7 @@ namespace Database\Factories; +use App\Models\Accessory; use App\Models\Category; use App\Models\Location; use App\Models\Manufacturer; @@ -9,15 +10,6 @@ use App\Models\Supplier; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; -/* -|-------------------------------------------------------------------------- -| Asset Model Factories -|-------------------------------------------------------------------------- -| -| Factories related exclusively to creating models .. -| -*/ - class AccessoryFactory extends Factory { /** @@ -25,7 +17,7 @@ class AccessoryFactory extends Factory * * @var string */ - protected $model = \App\Models\Accessory::class; + protected $model = Accessory::class; /** * Define the model's default state. diff --git a/database/factories/ActionlogFactory.php b/database/factories/ActionlogFactory.php index 50f6049f1e..1064524b1a 100644 --- a/database/factories/ActionlogFactory.php +++ b/database/factories/ActionlogFactory.php @@ -8,15 +8,6 @@ use App\Models\Location; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; -/* -|-------------------------------------------------------------------------- -| Action Log Factories -|-------------------------------------------------------------------------- -| -| This simulates checkin/checkout/etc activities -| -*/ - class ActionlogFactory extends Factory { /** diff --git a/database/factories/AssetFactory.php b/database/factories/AssetFactory.php index 4a786b814b..47834167ce 100644 --- a/database/factories/AssetFactory.php +++ b/database/factories/AssetFactory.php @@ -4,24 +4,12 @@ namespace Database\Factories; use App\Models\Asset; use App\Models\AssetModel; -use App\Models\Category; use App\Models\Location; use App\Models\Statuslabel; use App\Models\Supplier; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; -/* -|-------------------------------------------------------------------------- -| Model Factories -|-------------------------------------------------------------------------- -| -| Factories related exclusively to modelling assets. -| -*/ - -// These are just for unit tests, not to generate data - class AssetFactory extends Factory { /** diff --git a/database/factories/AssetMaintenanceFactory.php b/database/factories/AssetMaintenanceFactory.php index 1cf7c0d844..ada73f7ed8 100644 --- a/database/factories/AssetMaintenanceFactory.php +++ b/database/factories/AssetMaintenanceFactory.php @@ -3,20 +3,10 @@ namespace Database\Factories; use App\Models\Asset; -use App\Models\AssetModel; -use App\Models\Category; +use App\Models\AssetMaintenance; use App\Models\Supplier; use Illuminate\Database\Eloquent\Factories\Factory; -/* -|-------------------------------------------------------------------------- -| Model Factories -|-------------------------------------------------------------------------- -| -| Factories related exclusively to modelling assets. -| -*/ - class AssetMaintenanceFactory extends Factory { /** @@ -24,7 +14,7 @@ class AssetMaintenanceFactory extends Factory * * @var string */ - protected $model = \App\Models\AssetMaintenance::class; + protected $model = AssetMaintenance::class; /** * Define the model's default state. diff --git a/database/factories/AssetModelFactory.php b/database/factories/AssetModelFactory.php index 208ad8a687..4881d6560b 100644 --- a/database/factories/AssetModelFactory.php +++ b/database/factories/AssetModelFactory.php @@ -2,74 +2,14 @@ namespace Database\Factories; -use App\Models\AssetMaintenance; +use App\Models\AssetModel; use App\Models\CustomFieldset; use App\Models\Depreciation; -use App\Models\Import; use App\Models\Manufacturer; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use App\Models\Category; -/* -|-------------------------------------------------------------------------- -| Asset Model Factories -|-------------------------------------------------------------------------- -| -| Factories related exclusively to creating models .. -| -*/ - -/* -|-------------------------------------------------------------------------- -| Laptops -|-------------------------------------------------------------------------- -*/ - -// 1 - -// 2 - -// 3 - -// 4 - -// 5 - -// 6 - -// 7 - -/* -|-------------------------------------------------------------------------- -| Desktops -|-------------------------------------------------------------------------- -*/ - -/* -|-------------------------------------------------------------------------- -| Conference Phones -|-------------------------------------------------------------------------- -*/ - -/* -|-------------------------------------------------------------------------- -| Tablets -|-------------------------------------------------------------------------- -*/ - -/* -|-------------------------------------------------------------------------- -| Mobile Phones -|-------------------------------------------------------------------------- -*/ - -/* -|-------------------------------------------------------------------------- -| Displays -|-------------------------------------------------------------------------- -*/ - class AssetModelFactory extends Factory { /** @@ -77,7 +17,7 @@ class AssetModelFactory extends Factory * * @var string */ - protected $model = \App\Models\AssetModel::class; + protected $model = AssetModel::class; /** * Define the model's default state. diff --git a/database/factories/CategoryFactory.php b/database/factories/CategoryFactory.php index d66b714201..2cabb54a21 100644 --- a/database/factories/CategoryFactory.php +++ b/database/factories/CategoryFactory.php @@ -6,15 +6,6 @@ use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use App\Models\Category; -/* -|-------------------------------------------------------------------------- -| Category Factories -|-------------------------------------------------------------------------- -| -| Factories related exclusively to creating categories and the various states.. -| -*/ - class CategoryFactory extends Factory { /** @@ -22,7 +13,7 @@ class CategoryFactory extends Factory * * @var string */ - protected $model = \App\Models\Category::class; + protected $model = Category::class; /** * Define the model's default state. diff --git a/database/factories/CompanyFactory.php b/database/factories/CompanyFactory.php index 00dcf911c1..bf4b7ce242 100644 --- a/database/factories/CompanyFactory.php +++ b/database/factories/CompanyFactory.php @@ -1,25 +1,8 @@ User::factory()->superuser(), 'name' => $this->faker->name(), diff --git a/database/factories/ManufacturerFactory.php b/database/factories/ManufacturerFactory.php index e42e50c2d0..ab22262a78 100644 --- a/database/factories/ManufacturerFactory.php +++ b/database/factories/ManufacturerFactory.php @@ -2,40 +2,10 @@ namespace Database\Factories; +use App\Models\Manufacturer; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; -/* -|-------------------------------------------------------------------------- -| Asset Model Factories -|-------------------------------------------------------------------------- -| -| Factories related exclusively to creating models .. -| -*/ - -// 1 - -// 2 - -// 3 - -// 4 - -// 5 - -// 6 - -// 7 - -// 8 - -// 9 - -// 10 - -// 11 - class ManufacturerFactory extends Factory { /** @@ -43,7 +13,7 @@ class ManufacturerFactory extends Factory * * @var string */ - protected $model = \App\Models\Manufacturer::class; + protected $model = Manufacturer::class; /** * Define the model's default state. diff --git a/database/factories/SettingFactory.php b/database/factories/SettingFactory.php index 038788dff5..1aa173fd15 100644 --- a/database/factories/SettingFactory.php +++ b/database/factories/SettingFactory.php @@ -1,25 +1,8 @@