Skip to content

Commit

Permalink
Fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentj committed Oct 18, 2024
1 parent 52f7279 commit 31f9406
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jobs:
uses: shivammathur/setup-php@v2
# About the PHP version, do not forget to change in PHP Unit as well
with:
php-version: '8.0'
php-version: '8.2'
tools: phpstan:1.11.11
ini-values: error_reporting=22527

- name: Cache dependencies
uses: actions/cache@v4
Expand Down
4 changes: 2 additions & 2 deletions lizmap/modules/lizmap/classes/lizmap.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static function getRepositoryList()
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 @@ -150,7 +150,7 @@ public static function getRepositoryProperties()
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
4 changes: 0 additions & 4 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,3 @@ parameters:
message: "#^Call to an undefined static method jLocale::getBundle\\(\\)\\.$#"
count: 1
path: lizmap/modules/lizmap/lib/App/LocalesLoader.php
-
message: "#^Unreachable statement - code above always terminates\\.$#"
count: 2
path: lizmap/modules/lizmap/classes/lizmap.class.php

0 comments on commit 31f9406

Please sign in to comment.