From 1960cec21fee1844f18e39e5637074f72b519fa7 Mon Sep 17 00:00:00 2001 From: Refringe Date: Wed, 17 Jul 2024 23:50:57 -0400 Subject: [PATCH] Updates PHPStan to ignore tests --- app/Jobs/ImportHubData.php | 4 ++-- composer.json | 2 +- phpstan.neon | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Jobs/ImportHubData.php b/app/Jobs/ImportHubData.php index dbae4fb..35f7e97 100644 --- a/app/Jobs/ImportHubData.php +++ b/app/Jobs/ImportHubData.php @@ -536,10 +536,10 @@ class ImportHubData implements ShouldBeUnique, ShouldQueue 'thumbnail' => $this->fetchModThumbnail($curl, $mod->fileID, $mod->iconHash, $mod->iconExtension), 'license_id' => License::whereHubId($mod->licenseID)->value('id'), 'source_code_link' => $optionSourceCode?->source_code_link ?? '', - 'featured' => (bool) $mod?->isFeatured, + 'featured' => (bool) $mod->isFeatured, 'contains_ai_content' => (bool) $optionContainsAi?->contains_ai, 'contains_ads' => (bool) $optionContainsAds?->contains_ads, - 'disabled' => (bool) $mod?->isDisabled, + 'disabled' => (bool) $mod->isDisabled, 'created_at' => Carbon::parse($mod->time, 'UTC'), 'updated_at' => Carbon::parse($mod->lastChangeTime, 'UTC'), ]; diff --git a/composer.json b/composer.json index 88f1c36..52f0ab6 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ }, "scripts": { "phpstan": [ - "./vendor/bin/phpstan analyse --debug --memory-limit=2G" + "./vendor/bin/phpstan analyse -c phpstan.neon --debug --memory-limit=2G" ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", diff --git a/phpstan.neon b/phpstan.neon index 73a77ce..e3d130b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,7 +1,9 @@ includes: - ./vendor/larastan/larastan/extension.neon - parameters: paths: - app/ + excludePaths: + analyseAndScan: + - tests/ level: 4