From b9429b9a0ed5d08ef3b0d9d5b8e2b6c6810400e9 Mon Sep 17 00:00:00 2001 From: Laurent Jouanneau Date: Tue, 27 Aug 2024 11:41:07 +0200 Subject: [PATCH] Fix phpstan errors --- lizmap/modules/admin/install/upgrade.php | 1 + lizmap/modules/lizmap/classes/lizmap.class.php | 2 ++ tests/units/composer.json | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lizmap/modules/admin/install/upgrade.php b/lizmap/modules/admin/install/upgrade.php index 7030875103..161f1d6095 100644 --- a/lizmap/modules/admin/install/upgrade.php +++ b/lizmap/modules/admin/install/upgrade.php @@ -13,6 +13,7 @@ public function install(Jelix\Installer\Module\API\InstallHelpers $helpers) { // remove some unwanted web assets that may have been set by previous installation // having bugs into their installers. + /** @var Jelix\IniFile\IniModifierInterface $localConf */ $localConf = $helpers->getLocalConfigIni(); $localConf->removeValue('jauthdb_admin.js', 'webassets_common'); $localConf->removeValue('jauthdb_admin.css', 'webassets_common'); diff --git a/lizmap/modules/lizmap/classes/lizmap.class.php b/lizmap/modules/lizmap/classes/lizmap.class.php index 1b93aa2db9..c96dff964a 100644 --- a/lizmap/modules/lizmap/classes/lizmap.class.php +++ b/lizmap/modules/lizmap/classes/lizmap.class.php @@ -138,6 +138,7 @@ public static function getRepositoryProperties() { trigger_error('This method is deprecated. Please use the lizmapRepository::getProperties() method.', E_DEPRECATED); + // @phpstan-ignore deadCode.unreachable return lizmapRepository::$properties; } @@ -151,6 +152,7 @@ public static function getRepositoryPropertiesOptions() { trigger_error('This method is deprecated. Please use the lizmapRepository::getPropertiesOptions() method.', E_DEPRECATED); + // @phpstan-ignore deadCode.unreachable return lizmapRepository::$propertiesOptions; } diff --git a/tests/units/composer.json b/tests/units/composer.json index 0028a78dcb..e4f2c8d093 100644 --- a/tests/units/composer.json +++ b/tests/units/composer.json @@ -10,7 +10,7 @@ "require": { "php": ">=7.3.0", "phpunit/phpunit": "^9.5.7", - "phpstan/phpstan": "^1.5.3" + "phpstan/phpstan": "1.11.*" }, "autoload": { "classmap": ["../../lizmap/modules/lizmap/classes/" ],