From b0742978b86dc0ba73f24b5ba4d27972c2bdc531 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 13 Aug 2026 11:44:01 +0100 Subject: [PATCH] Cleaned up some PHPStan errors, re-ran baseline --- .../Traits/MigratesLegacyAssetLocations.php | 8 +- app/Importer/LicenseImporter.php | 2 +- app/Models/Asset.php | 7 + app/Models/SnipeModel.php | 3 + app/Models/User.php | 3 + phpstan-baseline.neon | 602 +----------------- 6 files changed, 19 insertions(+), 606 deletions(-) diff --git a/app/Http/Traits/MigratesLegacyAssetLocations.php b/app/Http/Traits/MigratesLegacyAssetLocations.php index 67e546306f..5c4a402764 100644 --- a/app/Http/Traits/MigratesLegacyAssetLocations.php +++ b/app/Http/Traits/MigratesLegacyAssetLocations.php @@ -15,17 +15,17 @@ trait MigratesLegacyAssetLocations */ private function migrateLegacyLocations(Asset $asset): void { - if ($asset->rtd_location_id == '0') { + if ($asset->rtd_location_id == 0) { Log::debug('Manually override the RTD location IDs'); Log::debug('Original RTD Location ID: '.$asset->rtd_location_id); - $asset->rtd_location_id = ''; + $asset->rtd_location_id = null; Log::debug('New RTD Location ID: '.$asset->rtd_location_id); } - if ($asset->location_id == '0') { + if ($asset->location_id == 0) { Log::debug('Manually override the location IDs'); Log::debug('Original Location ID: '.$asset->location_id); - $asset->location_id = ''; + $asset->location_id = null; Log::debug('New Location ID: '.$asset->location_id); } } diff --git a/app/Importer/LicenseImporter.php b/app/Importer/LicenseImporter.php index 4dba12dba6..77ec2ad64e 100644 --- a/app/Importer/LicenseImporter.php +++ b/app/Importer/LicenseImporter.php @@ -291,7 +291,7 @@ class LicenseImporter extends ItemImporter if (! $license->canCheckoutTo($asset)) { $this->log(trans('general.error_checkout_company_mismatch', [ 'item' => trans('general.license').' "'.$license->name.'"', - 'item_company' => $license->company?->name ?? trans('general.unassigned'), + 'item_company' => $license->company->name ?? trans('general.unassigned'), 'target' => trans('general.asset').' "'.$asset->display_name.'"', ])); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 8d17abdccc..c52cc7f8d2 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -30,6 +30,13 @@ use Watson\Validating\ValidatingTrait; * Model for Assets. * * @version v1.0 + * @property ?int $location_id + * @property Carbon|string|null $next_audit_date + * @property Carbon|string|null $last_audit_date + * @property Carbon|string|null $asset_eol_date + * @property ?int $company_id + * @property Carbon|string|null $last_checkin + * @property bool $requestable */ class Asset extends Depreciable { diff --git a/app/Models/SnipeModel.php b/app/Models/SnipeModel.php index f59078840b..32e7baeb0c 100644 --- a/app/Models/SnipeModel.php +++ b/app/Models/SnipeModel.php @@ -10,6 +10,9 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Support\Facades\Storage; +/** + * @property-read string $display_name + */ class SnipeModel extends Model { // Setters that are appropriate across multiple models. diff --git a/app/Models/User.php b/app/Models/User.php index 5b9a1b7b56..ba923a18f6 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -32,6 +32,9 @@ use Illuminate\Support\Str; use Laravel\Passport\HasApiTokens; use Watson\Validating\ValidatingTrait; +/** + * @property string $display_name + */ class User extends SnipeModel implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract, HasLocalePreference { use CompanyableTrait; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index fcd91dfe41..1f00dea6ea 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,11 +1,5 @@ parameters: ignoreErrors: - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Actions/Breadcrumbs/BuildAcceptanceBreadcrumbs.php - - message: '#^Method App\\Actions\\CheckoutRequests\\CreateCheckoutRequestAction\:\:run\(\) should return string but returns true\.$#' identifier: return.type @@ -648,12 +642,6 @@ parameters: count: 1 path: app/Console/Commands/SendInventoryAlerts.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Console/Commands/SendUpcomingAuditReport.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_formatted_date\.$#' identifier: property.notFound @@ -672,12 +660,6 @@ parameters: count: 1 path: app/Console/Commands/SendUpcomingAuditReport.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 4 - path: app/Console/Commands/SyncAssetLocations.php - - message: '#^Access to an undefined property ArrayObject\:\:\$id\.$#' identifier: property.notFound @@ -1074,12 +1056,6 @@ parameters: count: 1 path: app/Http/Controllers/Accessories/AccessoryCheckoutController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Accessories/AccessoryCheckoutController.php - - message: '#^Access to an undefined property App\\Models\\SnipeModel\:\:\$location_id\.$#' identifier: property.notFound @@ -1116,12 +1092,6 @@ parameters: count: 1 path: app/Http/Controllers/Accessories/AccessoryCheckoutController.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Account/AcceptanceController.php - - message: '#^Static method Illuminate\\Contracts\\Filesystem\\Filesystem\:\:makeDirectory\(\) invoked with 2 parameters, 1 required\.$#' identifier: arguments.count @@ -1164,12 +1134,6 @@ parameters: count: 1 path: app/Http/Controllers/Api/AccessoriesController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Api/AccessoriesController.php - - message: '#^Access to an undefined property App\\Models\\SnipeModel\:\:\$location_id\.$#' identifier: property.notFound @@ -1296,54 +1260,12 @@ parameters: count: 1 path: app/Http/Controllers/Api/AssetModelsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$company_id\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/AssetsController.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$created_by\.$#' identifier: property.notFound count: 1 path: app/Http/Controllers/Api/AssetsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Controllers/Api/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Api/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$next_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$location_id\.$#' - identifier: property.notFound - count: 5 - path: app/Http/Controllers/Api/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$requestable\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/AssetsController.php - - message: '#^Access to an undefined property App\\Models\\SnipeModel\:\:\$image\.$#' identifier: property.notFound @@ -1446,12 +1368,6 @@ parameters: count: 1 path: app/Http/Controllers/Api/AssetsController.php - - - message: '#^Property App\\Models\\Asset\:\:\$rtd_location_id \(int\|null\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: app/Http/Controllers/Api/AssetsController.php - - message: '#^Relation ''accessories'' is not found in App\\Models\\AccessoryCheckout model\.$#' identifier: larastan.relationExistence @@ -1542,12 +1458,6 @@ parameters: count: 1 path: app/Http/Controllers/Api/CompaniesController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$company_id\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/ComponentsController.php - - message: '#^Access to an undefined property App\\Models\\Component\:\:\$assigned_to\.$#' identifier: property.notFound @@ -1818,12 +1728,6 @@ parameters: count: 1 path: app/Http/Controllers/Api/LabelsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$company_id\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/LicenseSeatsController.php - - message: '#^Call to an undefined method App\\Models\\LicenseSeat\:\:getErrors\(\)\.$#' identifier: method.notFound @@ -1842,12 +1746,6 @@ parameters: count: 1 path: app/Http/Controllers/Api/LicenseSeatsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$company_id\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Api/LicensesController.php - - message: '#^Access to an undefined property App\\Models\\License\:\:\$created_by\.$#' identifier: property.notFound @@ -2406,24 +2304,6 @@ parameters: count: 1 path: app/Http/Controllers/AssetModelsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetCheckinController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 5 - path: app/Http/Controllers/Assets/AssetCheckinController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$requestable\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetCheckinController.php - - message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\Relation\:\:disassociate\(\)\.$#' identifier: method.notFound @@ -2442,36 +2322,12 @@ parameters: count: 1 path: app/Http/Controllers/Assets/AssetCheckinController.php - - - message: '#^Property App\\Models\\Asset\:\:\$rtd_location_id \(int\|null\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: app/Http/Controllers/Assets/AssetCheckinController.php - - message: '#^Property App\\Models\\Asset\:\:\$status_id \(int\|null\) does not accept string\.$#' identifier: assign.propertyType count: 1 path: app/Http/Controllers/Assets/AssetCheckinController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetCheckoutController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Assets/AssetCheckoutController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$requestable\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetCheckoutController.php - - message: '#^Access to an undefined property App\\Models\\SnipeModel\:\:\$location_id\.$#' identifier: property.notFound @@ -2508,60 +2364,12 @@ parameters: count: 1 path: app/Http/Controllers/Assets/AssetCheckoutController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 4 - path: app/Http/Controllers/Assets/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$company_id\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Controllers/Assets/AssetsController.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$created_by\.$#' identifier: property.notFound count: 1 path: app/Http/Controllers/Assets/AssetsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Assets/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$next_audit_date\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Assets/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$requestable\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Controllers/Assets/AssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$location_id\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/AssetsController.php - - message: '#^Access to an undefined property App\\Models\\CheckoutRequest\:\:\$requestable\.$#' identifier: property.notFound @@ -2706,48 +2514,6 @@ parameters: count: 1 path: app/Http/Controllers/Assets/AssetsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$company_id\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 9 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$next_audit_date\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$requestable\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - message: '#^Access to an undefined property App\\Models\\SnipeModel\:\:\$location_id\.$#' identifier: property.notFound @@ -2772,12 +2538,6 @@ parameters: count: 1 path: app/Http/Controllers/Assets/BulkAssetsController.php - - - message: '#^Property App\\Models\\Asset\:\:\$rtd_location_id \(int\|null\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: app/Http/Controllers/Assets/BulkAssetsController.php - - message: '#^Right side of \|\| is always false\.$#' identifier: booleanOr.rightAlwaysFalse @@ -3090,12 +2850,6 @@ parameters: count: 3 path: app/Http/Controllers/Components/ComponentCheckinController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Components/ComponentCheckoutController.php - - message: '#^Access to an undefined property App\\Models\\Component\:\:\$asset_id\.$#' identifier: property.notFound @@ -3342,12 +3096,6 @@ parameters: count: 2 path: app/Http/Controllers/GroupsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Http/Controllers/Kits/CheckoutKitController.php - - message: '#^Access to an undefined property App\\Models\\SnipeModel\:\:\$location_id\.$#' identifier: property.notFound @@ -3492,24 +3240,12 @@ parameters: count: 3 path: app/Http/Controllers/Kits/PredefinedKitsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/LabelsController.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$is_label_preview\.$#' identifier: property.notFound count: 1 path: app/Http/Controllers/LabelsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/LabelsController.php - - message: '#^Property App\\Models\\Asset\:\:\$company is not writable\.$#' identifier: assign.propertyReadOnly @@ -3570,12 +3306,6 @@ parameters: count: 1 path: app/Http/Controllers/Licenses/LicenseCheckinController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Licenses/LicenseCheckoutController.php - - message: '#^Using nullsafe property access "\?\-\>name" on left side of \?\? is unnecessary\. Use \-\> instead\.$#' identifier: nullsafe.neverNull @@ -3816,42 +3546,18 @@ parameters: count: 1 path: app/Http/Controllers/Reports/CustomComponentReportController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/ReportsController.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$assigned\.$#' identifier: property.notFound count: 2 path: app/Http/Controllers/ReportsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/ReportsController.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/ReportsController.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkout\.$#' identifier: property.notFound count: 1 path: app/Http/Controllers/ReportsController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$next_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/ReportsController.php - - message: '#^Access to an undefined property App\\Models\\License\:\:\$depreciation\.$#' identifier: property.notFound @@ -4284,12 +3990,6 @@ parameters: count: 2 path: app/Http/Controllers/Users/ImpersonateController.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Users/ImpersonateController.php - - message: '#^Dead catch \- Exception is never thrown in the try block\.$#' identifier: catch.neverThrown @@ -4302,18 +4002,6 @@ parameters: count: 1 path: app/Http/Controllers/Users/UserItemTransferController.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Users/UserItemTransferController.php - - - - message: '#^Access to an undefined property App\\Models\\User\|Illuminate\\Database\\Eloquent\\Collection\\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/Users/UserItemTransferController.php - - message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\Relation\:\:dissociate\(\)\.$#' identifier: method.notFound @@ -4326,12 +4014,6 @@ parameters: count: 2 path: app/Http/Controllers/Users/UsersController.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Controllers/Users/UsersController.php - - message: '#^Access to an undefined property App\\Models\\User\:\:\$manages_locations_count\.$#' identifier: property.notFound @@ -4386,12 +4068,6 @@ parameters: count: 1 path: app/Http/Controllers/Users/UsersController.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Controllers/ViewAssetsController.php - - message: '#^PHPDoc tag @param references unknown parameter\: \$assetId$#' identifier: parameter.notFound @@ -4572,48 +4248,12 @@ parameters: count: 1 path: app/Http/Transformers/AssetsTransformer.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 2 - path: app/Http/Transformers/AssetsTransformer.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Transformers/AssetsTransformer.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Transformers/AssetsTransformer.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkin\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Transformers/AssetsTransformer.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkout\.$#' identifier: property.notFound count: 1 path: app/Http/Transformers/AssetsTransformer.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$next_audit_date\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Transformers/AssetsTransformer.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$requestable\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Transformers/AssetsTransformer.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$warranty_expires\.$#' identifier: property.notFound @@ -4782,12 +4422,6 @@ parameters: count: 1 path: app/Http/Transformers/LicensesTransformer.php - - - message: '#^Access to an undefined property App\\Models\\Accessory\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Http/Transformers/LocationsTransformer.php - - message: '#^Method App\\Http\\Transformers\\LocationsTransformer\:\:transformLocationCompact\(\) should return array but return statement is missing\.$#' identifier: return.missing @@ -4986,12 +4620,6 @@ parameters: count: 1 path: app/Http/Transformers/UsersTransformer.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 4 - path: app/Http/Transformers/UsersTransformer.php - - message: '#^Access to an undefined property App\\Models\\User\:\:\$manages_locations_count\.$#' identifier: property.notFound @@ -5046,12 +4674,6 @@ parameters: count: 1 path: app/Importer/AccessoryImporter.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 2 - path: app/Importer/AssetHistoryImporter.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -5076,12 +4698,6 @@ parameters: count: 1 path: app/Importer/AssetImporter.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Importer/AssetImporter.php - - message: '#^Call to function is_null\(\) with string will always evaluate to false\.$#' identifier: function.impossibleType @@ -5142,12 +4758,6 @@ parameters: count: 1 path: app/Importer/CategoryImporter.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Importer/ComponentImporter.php - - message: '#^Access to an undefined property App\\Models\\Component\:\:\$created_by\.$#' identifier: property.notFound @@ -5208,12 +4818,6 @@ parameters: count: 1 path: app/Importer/Importer.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Importer/Importer.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -5466,12 +5070,6 @@ parameters: count: 1 path: app/Importer/ItemImporter.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Importer/LicenseImporter.php - - message: '#^Access to an undefined property App\\Models\\License\:\:\$created_by\.$#' identifier: property.notFound @@ -5487,7 +5085,7 @@ parameters: - message: '#^Using nullsafe property access "\?\-\>name" on left side of \?\? is unnecessary\. Use \-\> instead\.$#' identifier: nullsafe.neverNull - count: 2 + count: 1 path: app/Importer/LicenseImporter.php - @@ -6078,12 +5676,6 @@ parameters: count: 1 path: app/Mail/CheckoutAccessoryMail.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Mail/CheckoutAccessoryMail.php - - message: '#^Access to an undefined property App\\Mail\\CheckoutAssetMail\:\:\$acceptance\.$#' identifier: property.notFound @@ -6138,12 +5730,6 @@ parameters: count: 1 path: app/Mail/CheckoutAssetMail.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Mail/CheckoutAssetMail.php - - message: '#^PHPDoc tag @param references unknown parameter\: \$notifiable$#' identifier: parameter.notFound @@ -6282,18 +5868,6 @@ parameters: count: 2 path: app/Mail/CheckoutLicenseMail.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Mail/CheckoutLicenseMail.php - - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Mail/CheckoutLicenseMail.php - - message: '#^Access to an undefined property App\\Mail\\ExpiringAssetsMail\:\:\$assets\.$#' identifier: property.notFound @@ -6660,18 +6234,6 @@ parameters: count: 5 path: app/Models/Asset.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 1 - path: app/Models/Asset.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$company_id\.$#' - identifier: property.notFound - count: 3 - path: app/Models/Asset.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$created_by\.$#' identifier: property.notFound @@ -6696,12 +6258,6 @@ parameters: count: 3 path: app/Models/Asset.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 2 - path: app/Models/Asset.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_checkout\.$#' identifier: property.notFound @@ -6720,18 +6276,6 @@ parameters: count: 5 path: app/Models/Asset.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 3 - path: app/Models/Asset.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$next_audit_date\.$#' - identifier: property.notFound - count: 2 - path: app/Models/Asset.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$warrantyExpires\.$#' identifier: property.notFound @@ -8568,12 +8112,6 @@ parameters: count: 1 path: app/Models/Labels/Tapes/Generic/Tape_53mm.php - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Models/Ldap.php - - message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Relations\\Relation\:\:attach\(\)\.$#' identifier: method.notFound @@ -10830,18 +10368,6 @@ parameters: count: 4 path: app/Observers/AssetObserver.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 4 - path: app/Observers/AssetObserver.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$company_id\.$#' - identifier: property.notFound - count: 2 - path: app/Observers/AssetObserver.php - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$created_by\.$#' identifier: property.notFound @@ -11748,114 +11274,12 @@ parameters: count: 1 path: app/Providers/AuthServiceProvider.php - - - message: '#^Access to an undefined property App\\Models\\Accessory\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$display_name\.$#' - identifier: property.notFound - count: 2 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\AssetModel\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Category\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Company\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - message: '#^Access to an undefined property App\\Models\\Company\:\:\$parent\.$#' identifier: property.notFound count: 1 path: app/Providers/BreadcrumbsServiceProvider.php - - - message: '#^Access to an undefined property App\\Models\\Component\:\:\$display_name\.$#' - identifier: property.notFound - count: 2 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Consumable\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\CustomFieldset\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Department\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Depreciation\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Group\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\License\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Maintenance\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\PredefinedKit\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Statuslabel\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\Supplier\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - - - message: '#^Access to an undefined property App\\Models\\User\:\:\$display_name\.$#' - identifier: property.notFound - count: 1 - path: app/Providers/BreadcrumbsServiceProvider.php - - message: '#^Cannot access property \$component_id on array\\|object\.$#' identifier: property.nonObject @@ -12078,12 +11502,6 @@ parameters: count: 1 path: database/factories/ActionlogFactory.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 1 - path: database/factories/AssetFactory.php - - message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$id\.$#' identifier: property.notFound @@ -12270,12 +11688,6 @@ parameters: count: 1 path: database/factories/LocationFactory.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$location_id\.$#' - identifier: property.notFound - count: 1 - path: database/factories/MaintenanceFactory.php - - message: '#^Access to an undefined property Illuminate\\Database\\Eloquent\\Model\:\:\$id\.$#' identifier: property.notFound @@ -12444,12 +11856,6 @@ parameters: count: 1 path: database/migrations/2017_01_25_063357_fix_utf8_custom_field_column_names.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$last_audit_date\.$#' - identifier: property.notFound - count: 1 - path: database/migrations/2017_12_26_170856_re_normalize_last_audit.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -12480,12 +11886,6 @@ parameters: count: 1 path: database/migrations/2022_05_16_235350_remove_stored_eula_field.php - - - message: '#^Access to an undefined property App\\Models\\Asset\:\:\$asset_eol_date\.$#' - identifier: property.notFound - count: 1 - path: database/migrations/2023_07_13_052204_denormalized_eol_and_add_column_for_explicit_date_to_assets.php - - message: '#^Method DenormalizedEolAndAddColumnForExplicitDateToAssets\:\:eolUpdateExpression\(\) should return Illuminate\\Database\\Query\\Expression but returns Illuminate\\Contracts\\Database\\Query\\Expression\.$#' identifier: return.type