Skip to content

Commit

Permalink
ci: ignore handled deprecation notice from phpstan
Browse files Browse the repository at this point in the history
The code already uses the new methods if available, the deprecated
method is used only on older yet still supported Nextcloud versions.

Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Jan 5, 2025
1 parent 59446ed commit 0409621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function index(): TemplateResponse
if (class_exists('\OCP\ServerVersion')) {
$version = (new \OCP\ServerVersion())->getMajorVersion();
} else {
/* @phpstan-ignore staticMethod.deprecated */
$version = Util::getVersion()[0];
}

Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
inferPrivatePropertyTypeFromConstructor: true
treatPhpDocTypesAsCertain: false
reportUnmatchedIgnoredErrors: false
bootstrapFiles:
- %currentWorkingDirectory%/../../lib/base.php
excludePaths:
Expand Down

0 comments on commit 0409621

Please sign in to comment.