Skip to content

Commit

Permalink
Fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentj committed Aug 27, 2024
1 parent a66d6f2 commit b9429b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lizmap/modules/admin/install/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions lizmap/modules/lizmap/classes/lizmap.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/units/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/" ],
Expand Down

1 comment on commit b9429b9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest run of PHPStan has failed, maybe it's due to a newer version released recently 😣
Current version used on CI :

PHPStan - PHP Static Analysis Tool 1.12.0

https://github.com/phpstan/phpstan/releases

Have a look to your current version of PHPStan like :

docker exec CONTAINER_test_php tests/units/vendor/phpstan/phpstan/phpstan -V

And update if needed :

./lizmap-ctl composer-update

Please sign in to comment.