Skip to content

A free open source IT asset/license management system

Fixed Relation not found phpstan errors

snipec17c4c48574d
diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php
index c5ee21fa92..886af7d51f 100644
--- a/app/Http/Controllers/Assets/BulkAssetsController.php
+++ b/app/Http/Controllers/Assets/BulkAssetsController.php
@@ -266,7 +266,7 @@ class BulkAssetsController extends Controller
// is Referer-derived and would need its own sanitize step.
$bulk_back_url = Helper::sameOriginUrl($request->session()->pull('bulk_back_url')) ?? route('hardware.index');
- $custom_field_columns = CustomField::all()->pluck('db_column')->toArray();
+ $custom_field_columns = CustomField::pluck('db_column')->toArray();
// find custom field input attributes that start with 'null_'
$null_custom_fields_inputs = array_filter($request->all(), function ($key) {
diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php
index a01f976233..5142c60850 100755
--- a/app/Models/Accessory.php
+++ b/app/Models/Accessory.php
@@ -14,6 +14,7 @@ use App\Presenters\AccessoryPresenter;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
+use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
@@ -273,7 +274,7 @@ class Accessory extends SnipeModel
* @since v5.0.0
* @see checkedout()
*/
- public function lastCheckout()
+ public function lastCheckout(): HasMany
{
return $this->assetlog()->where('action_type', '=', 'checkout')->take(1);
}
diff --git a/app/Models/AccessoryCheckout.php b/app/Models/AccessoryCheckout.php
index 3c3f734dbb..beb65a48ca 100755
--- a/app/Models/AccessoryCheckout.php
+++ b/app/Models/AccessoryCheckout.php
@@ -7,6 +7,7 @@ use App\Presenters\AccessoryPresenter;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\Relation;
/**
@@ -44,7 +45,7 @@ class AccessoryCheckout extends Model
return $this->belongsTo(Accessory::class);
}
- public function accessories()
+ public function accessories(): HasMany
{
return $this->hasMany(Accessory::class, 'id', 'accessory_id');
}
diff --git a/app/Models/Company.php b/app/Models/Company.php
index 0909b1fced..dce4e75610 100644
--- a/app/Models/Company.php
+++ b/app/Models/Company.php
@@ -10,6 +10,7 @@ use App\Models\Traits\Searchable;
use App\Presenters\CompanyPresenter;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
@@ -499,7 +500,7 @@ final class Company extends SnipeModel
* on the index page. Hierarchy is metadata about a row the user already sees,
* not an access decision, so unscoping here is semantically correct too.
*/
- public function parent()
+ public function parent(): BelongsTo
{
return $this->belongsTo(self::class, 'parent_id')->withoutGlobalScopes();
}
diff --git a/app/Models/License.php b/app/Models/License.php
index 25a20fc6bb..bce850516f 100755
--- a/app/Models/License.php
+++ b/app/Models/License.php
@@ -15,6 +15,7 @@ use App\Presenters\Presentable;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
@@ -498,6 +499,12 @@ class License extends Depreciable
return $this->belongsTo(Manufacturer::class, 'manufacturer_id')->withTrashed();
}
+
+ public function depreciation(): BelongsTo
+ {
+ return $this->belongsTo(Depreciation::class, 'depreciation_id');
+ }
+
/**
* Determine whether the user should be emailed on checkin/checkout
*
diff --git a/app/Models/Maintenance.php b/app/Models/Maintenance.php
index d4f58e35fe..4f7b068307 100644
--- a/app/Models/Maintenance.php
+++ b/app/Models/Maintenance.php
@@ -12,6 +12,7 @@ use App\Models\Traits\Searchable;
use App\Presenters\MaintenancesPresenter;
use App\Presenters\Presentable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Gate;
@@ -263,7 +264,7 @@ class Maintenance extends SnipeModel implements ICompanyableChild
* still returns the right rows today. Once accessories actually
* carry maintenances, callers should switch to ->item.
*/
- public function asset()
+ public function asset(): BelongsTo
{
return $this->belongsTo(Asset::class, 'item_id')
->withTrashed();
diff --git a/app/Models/User.php b/app/Models/User.php
index f1f6b93239..5e98160a5b 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -22,6 +22,7 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
+use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\Access\Authorizable;
@@ -1081,7 +1082,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
* and from responsibleParty() (whoever is responsible for completion).
* Used by the user detail view's Maintenances tab and badge count.
*/
- public function assignedMaintenances()
+ public function assignedMaintenances(): MorphMany
{
return $this->morphMany(Maintenance::class, 'checked_out_to')->withTrashed();
}
diff --git a/database/migrations/2016_11_01_030818_fix_forgotten_filename_in_action_logs.php b/database/migrations/2016_11_01_030818_fix_forgotten_filename_in_action_logs.php
index 73963dcc41..1cd5b4dc3d 100644
--- a/database/migrations/2016_11_01_030818_fix_forgotten_filename_in_action_logs.php
+++ b/database/migrations/2016_11_01_030818_fix_forgotten_filename_in_action_logs.php
@@ -22,7 +22,7 @@ class FixForgottenFilenameInActionLogs extends Migration
->where('note', $log->note)
->where('filename', null)
->withTrashed()
- ->get()->first();
+ ->first();
if ($matching_action_log) {
$matching_action_log->filename = $log->filename;
diff --git a/database/seeders/AccessorySeeder.php b/database/seeders/AccessorySeeder.php
index 700967cd89..355a9ef83b 100644
--- a/database/seeders/AccessorySeeder.php
+++ b/database/seeders/AccessorySeeder.php
@@ -27,13 +27,13 @@ class AccessorySeeder extends Seeder
$this->call(LocationSeeder::class);
}
- $locationIds = Location::all()->pluck('id');
+ $locationIds = Location::pluck('id');
if (! Supplier::count()) {
$this->call(SupplierSeeder::class);
}
- $supplierIds = Supplier::all()->pluck('id');
+ $supplierIds = Supplier::pluck('id');
$admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
diff --git a/database/seeders/AssetSeeder.php b/database/seeders/AssetSeeder.php
index 5a60445aff..9c24cb96a6 100644
--- a/database/seeders/AssetSeeder.php
+++ b/database/seeders/AssetSeeder.php
@@ -36,8 +36,8 @@ class AssetSeeder extends Seeder
$this->ensureSuppliersSeeded();
$this->adminuser = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
- $this->locationIds = Location::all()->pluck('id');
- $this->supplierIds = Supplier::all()->pluck('id');
+ $this->locationIds = Location::pluck('id');
+ $this->supplierIds = Supplier::pluck('id');
$this->reportMemory('AssetSeeder start');
diff --git a/database/seeders/ComponentSeeder.php b/database/seeders/ComponentSeeder.php
index ed5b0f033a..73d6dcfeb0 100644
--- a/database/seeders/ComponentSeeder.php
+++ b/database/seeders/ComponentSeeder.php
@@ -26,18 +26,18 @@ class ComponentSeeder extends Seeder
$this->call(CompanySeeder::class);
}
- $companyIds = Company::all()->pluck('id');
+ $companyIds = Company::pluck('id');
if (! Location::count()) {
$this->call(LocationSeeder::class);
}
- $locationIds = Location::all()->pluck('id');
+ $locationIds = Location::pluck('id');
if (! Supplier::count()) {
$this->call(SupplierSeeder::class);
}
- $supplierIds = Supplier::all()->pluck('id');
+ $supplierIds = Supplier::pluck('id');
// See AccessorySeeder for the withInitialAcquisition rationale.
$randomAcquisition = function () use ($supplierIds) {
diff --git a/database/seeders/ConsumableSeeder.php b/database/seeders/ConsumableSeeder.php
index dd28dd1054..b5d9a6132a 100644
--- a/database/seeders/ConsumableSeeder.php
+++ b/database/seeders/ConsumableSeeder.php
@@ -22,7 +22,7 @@ class ConsumableSeeder extends Seeder
if (! Supplier::count()) {
$this->call(SupplierSeeder::class);
}
- $supplierIds = Supplier::all()->pluck('id');
+ $supplierIds = Supplier::pluck('id');
$admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
diff --git a/database/seeders/DepartmentSeeder.php b/database/seeders/DepartmentSeeder.php
index 7f20ee8cb9..d60facafa7 100644
--- a/database/seeders/DepartmentSeeder.php
+++ b/database/seeders/DepartmentSeeder.php
@@ -17,7 +17,7 @@ class DepartmentSeeder extends Seeder
$this->call(LocationSeeder::class);
}
- $locationIds = Location::all()->pluck('id');
+ $locationIds = Location::pluck('id');
$admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
diff --git a/database/seeders/LicenseSeeder.php b/database/seeders/LicenseSeeder.php
index 38a59459cf..8d7308f23a 100644
--- a/database/seeders/LicenseSeeder.php
+++ b/database/seeders/LicenseSeeder.php
@@ -40,7 +40,7 @@ class LicenseSeeder extends Seeder
$this->call(SupplierSeeder::class);
}
- $supplierIds = Supplier::all()->pluck('id');
+ $supplierIds = Supplier::pluck('id');
$admin = User::where('permissions->superuser', '1')->first() ?? User::factory()->firstAdmin()->create();
diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php
index 82719549d2..55df838f07 100644
--- a/database/seeders/UserSeeder.php
+++ b/database/seeders/UserSeeder.php
@@ -36,13 +36,13 @@ class UserSeeder extends Seeder
$this->call(CompanySeeder::class);
}
- $companyIds = Company::all()->pluck('id');
+ $companyIds = Company::pluck('id');
if (! Department::count()) {
$this->call(DepartmentSeeder::class);
}
- $departmentIds = Department::all()->pluck('id');
+ $departmentIds = Department::pluck('id');
// Named admins get multiple companies. They manage assets across several organisations.
foreach (['firstAdmin', 'snipeAdmin', 'testAdmin'] as $state) {
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index d5c63c8077..6799948137 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -1056,12 +1056,6 @@ parameters:
count: 1
path: app/Http/Controllers/Api/AccessoriesController.php
- -
- message: '#^Relation ''lastCheckout'' is not found in App\\Models\\Accessory model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/AccessoriesController.php
-
-
message: '#^Access to an undefined property App\\Models\\AssetModel\:\:\$use_image\.$#'
identifier: property.notFound
@@ -1206,12 +1200,6 @@ parameters:
count: 1
path: app/Http/Controllers/Api/AssetsController.php
- -
- message: '#^Relation ''accessories'' is not found in App\\Models\\AccessoryCheckout model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/AssetsController.php
-
-
message: '#^Access to an undefined property App\\Models\\Category\:\:\$created_by\.$#'
identifier: property.notFound
@@ -1284,12 +1272,6 @@ parameters:
count: 2
path: app/Http/Controllers/Api/CompaniesController.php
- -
- message: '#^Relation ''parent'' is not found in App\\Models\\Company model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/CompaniesController.php
-
-
message: '#^Access to an undefined property App\\Models\\Component\:\:\$assigned_to\.$#'
identifier: property.notFound
@@ -1632,12 +1614,6 @@ parameters:
count: 1
path: app/Http/Controllers/Api/LocationsController.php
- -
- message: '#^Relation ''accessories'' is not found in App\\Models\\AccessoryCheckout model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/LocationsController.php
-
-
message: '#^Using nullsafe property access "\?\-\>name" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
@@ -1698,12 +1674,6 @@ parameters:
count: 1
path: app/Http/Controllers/Api/MaintenancesController.php
- -
- message: '#^Relation ''asset'' is not found in App\\Models\\Maintenance model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/MaintenancesController.php
-
-
message: '#^Access to an undefined property App\\Models\\Actionlog\:\:\$created_by\.$#'
identifier: property.notFound
@@ -1830,12 +1800,6 @@ parameters:
count: 1
path: app/Http/Controllers/Api/ProfileController.php
- -
- message: '#^Relation ''asset'' is not found in App\\Models\\Maintenance model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/ReportsController.php
-
-
message: '#^Access to an undefined property Illuminate\\Pagination\\LengthAwarePaginator\<int, App\\Models\\Statuslabel\>\:\:\$use_text\.$#'
identifier: property.notFound
@@ -1980,12 +1944,6 @@ parameters:
count: 1
path: app/Http/Controllers/Api/UsersController.php
- -
- message: '#^Relation ''assignedMaintenances'' is not found in App\\Models\\User model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/Api/UsersController.php
-
-
message: '#^Access to an undefined property App\\Models\\AssetModel\:\:\$created_by\.$#'
identifier: property.notFound
@@ -2298,12 +2256,6 @@ parameters:
count: 1
path: app/Http/Controllers/Assets/BulkAssetsController.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 1
- path: app/Http/Controllers/Assets/BulkAssetsController.php
-
-
message: '#^Right side of \|\| is always false\.$#'
identifier: booleanOr.rightAlwaysFalse
@@ -3234,12 +3186,6 @@ parameters:
count: 2
path: app/Http/Controllers/ReportsController.php
- -
- message: '#^Access to an undefined property App\\Models\\License\:\:\$depreciation\.$#'
- identifier: property.notFound
- count: 1
- path: app/Http/Controllers/ReportsController.php
-
-
message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$asset\.$#'
identifier: property.notFound
@@ -3291,7 +3237,7 @@ parameters:
-
message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$name\.$#'
identifier: property.notFound
- count: 1
+ count: 2
path: app/Http/Controllers/ReportsController.php
-
@@ -3342,18 +3288,6 @@ parameters:
count: 1
path: app/Http/Controllers/ReportsController.php
- -
- message: '#^Relation ''asset'' is not found in App\\Models\\Maintenance model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/ReportsController.php
-
- -
- message: '#^Relation ''depreciation'' is not found in App\\Models\\License model\.$#'
- identifier: larastan.relationExistence
- count: 1
- path: app/Http/Controllers/ReportsController.php
-
-
message: '#^Unknown parameter \$firstTimeSending in call to App\\Mail\\CheckoutComponentMail constructor\.$#'
identifier: argument.unknown
@@ -3901,13 +3835,19 @@ parameters:
path: app/Http/Transformers/CompaniesTransformer.php
-
- message: '#^Access to an undefined property App\\Models\\Company\:\:\$parent\.$#'
+ message: '#^Access to an undefined property App\\Models\\Company\:\:\$users_count\.$#'
identifier: property.notFound
count: 1
path: app/Http/Transformers/CompaniesTransformer.php
-
- message: '#^Access to an undefined property App\\Models\\Company\:\:\$users_count\.$#'
+ message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$id\.$#'
+ identifier: property.notFound
+ count: 1
+ path: app/Http/Transformers/CompaniesTransformer.php
+
+ -
+ message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$name\.$#'
identifier: property.notFound
count: 1
path: app/Http/Transformers/CompaniesTransformer.php
@@ -3961,7 +3901,13 @@ parameters:
path: app/Http/Transformers/LicenseSeatsTransformer.php
-
- message: '#^Access to an undefined property App\\Models\\License\:\:\$depreciation\.$#'
+ message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$id\.$#'
+ identifier: property.notFound
+ count: 1
+ path: app/Http/Transformers/LicensesTransformer.php
+
+ -
+ message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$name\.$#'
identifier: property.notFound
count: 1
path: app/Http/Transformers/LicensesTransformer.php
@@ -4122,12 +4068,6 @@ parameters:
count: 1
path: app/Http/Transformers/UploadedFilesTransformer.php
- -
- message: '#^Access to an undefined property App\\Models\\User\:\:\$assigned_maintenances_count\.$#'
- identifier: property.notFound
- count: 1
- path: app/Http/Transformers/UsersTransformer.php
-
-
message: '#^Access to an undefined property App\\Models\\User\:\:\$manages_locations_count\.$#'
identifier: property.notFound
@@ -5454,6 +5394,12 @@ parameters:
count: 1
path: app/Models/Accessory.php
+ -
+ message: '#^Method App\\Models\\Accessory\:\:lastCheckout\(\) should return Illuminate\\Database\\Eloquent\\Relations\\HasMany but returns Illuminate\\Database\\Eloquent\\Relations\\Relation\.$#'
+ identifier: return.type
+ count: 1
+ path: app/Models/Accessory.php
+
-
message: '#^PHPDoc tag @SuppressWarnings has invalid value \(\(PHPMD\.UnusedFormalParameter\)\)\: Unexpected token "\.UnusedFormalParameter\)", expected ''\)'' at offset 351 on line 10$#'
identifier: phpDoc.parseError
@@ -8286,12 +8232,6 @@ parameters:
count: 1
path: app/Models/User.php
- -
- message: '#^Access to an undefined property App\\Models\\User\:\:\$assignedMaintenances\.$#'
- identifier: property.notFound
- count: 1
- path: app/Models/User.php
-
-
message: '#^Access to an undefined property App\\Models\\User\:\:\$company_id\.$#'
identifier: property.notFound
@@ -8346,6 +8286,12 @@ parameters:
count: 2
path: app/Models/User.php
+ -
+ message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$cost\.$#'
+ identifier: property.notFound
+ count: 1
+ path: app/Models/User.php
+
-
message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$id\.$#'
identifier: property.notFound
@@ -9679,7 +9625,7 @@ parameters:
path: app/Providers/AuthServiceProvider.php
-
- message: '#^Access to an undefined property App\\Models\\Company\:\:\$parent\.$#'
+ message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$name\.$#'
identifier: property.notFound
count: 1
path: app/Providers/BreadcrumbsServiceProvider.php
@@ -10230,12 +10176,6 @@ parameters:
count: 1
path: database/migrations/2015_11_26_195528_import_ldap_settings.php
- -
- message: '#^Called ''first'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 1
- path: database/migrations/2016_11_01_030818_fix_forgotten_filename_in_action_logs.php
-
-
message: '#^Method MakeAssetAssignedToPolymorphic\:\:down\(\) has invalid return type voidatom\.$#'
identifier: class.notFound
@@ -10314,12 +10254,6 @@ parameters:
count: 1
path: database/migrations/2024_09_17_204302_change_user_id_to_created_by.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 2
- path: database/seeders/AccessorySeeder.php
-
-
message: '#^Using nullsafe method call on non\-nullable type Illuminate\\Console\\Command\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
@@ -10344,12 +10278,6 @@ parameters:
count: 1
path: database/seeders/AssetSeeder.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 2
- path: database/seeders/AssetSeeder.php
-
-
message: '#^Property Database\\Seeders\\AssetSeeder\:\:\$admin is unused\.$#'
identifier: property.unused
@@ -10368,36 +10296,18 @@ parameters:
count: 1
path: database/seeders/ComponentSeeder.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 3
- path: database/seeders/ComponentSeeder.php
-
-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\Relation\:\:attach\(\)\.$#'
identifier: method.notFound
count: 1
path: database/seeders/ConsumableSeeder.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 1
- path: database/seeders/ConsumableSeeder.php
-
-
message: '#^Using nullsafe method call on non\-nullable type Illuminate\\Console\\Command\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
count: 1
path: database/seeders/DatabaseSeeder.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 1
- path: database/seeders/DepartmentSeeder.php
-
-
message: '#^Access to an undefined property App\\Models\\Import\:\:\$created_by\.$#'
identifier: property.notFound
@@ -10410,12 +10320,6 @@ parameters:
count: 2
path: database/seeders/ImportSeeder.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 1
- path: database/seeders/LicenseSeeder.php
-
-
message: '#^Access to an undefined property App\\Models\\User\:\:\$enable_sound\.$#'
identifier: property.notFound
@@ -10446,12 +10350,6 @@ parameters:
count: 1
path: database/seeders/SettingsSeeder.php
- -
- message: '#^Called ''pluck'' on Laravel collection, but could have been retrieved as a query\.$#'
- identifier: larastan.noUnnecessaryCollectionCall
- count: 2
- path: database/seeders/UserSeeder.php
-
-
message: '#^Using nullsafe method call on non\-nullable type Illuminate\\Console\\Command\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull