Skip to content

Commit

Permalink
Merge pull request #37497 from owncloud/adjust-for-phpstan-0.12.26
Browse files Browse the repository at this point in the history
[Tests-Only] Adjust code and settings so phpstan 0.12.26 passes
  • Loading branch information
phil-davis authored Jun 8, 2020
2 parents ad51e11 + 82ea679 commit 3f0decc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions lib/private/legacy/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function __construct($imageRef = null, $logger = null) {
}

if (\OC_Util::fileInfoLoaded()) {
/* @phpstan-ignore-next-line */
$this->fileInfo = new finfo(FILEINFO_MIME_TYPE);
}

Expand Down
1 change: 1 addition & 0 deletions lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ public static function clearOpcodeCache() {
}
// Zend Opcache
if (\function_exists('accelerator_reset')) {
/* @phpstan-ignore-next-line */
accelerator_reset();
}
// Opcache (PHP >= 5.5)
Expand Down
23 changes: 10 additions & 13 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
parameters:
bootstrap: %currentWorkingDirectory%/lib/base.php
autoload_directories:
- %currentWorkingDirectory%/apps/files_sharing/appinfo/Migrations
- %currentWorkingDirectory%/apps/dav/appinfo/Migrations
- %currentWorkingDirectory%/apps/federatedfilesharing/appinfo/Migrations
- %currentWorkingDirectory%/apps/files_external/appinfo/Migrations
- %currentWorkingDirectory%/apps/files_external/lib
- %currentWorkingDirectory%/apps/files_external/3rdparty
- %currentWorkingDirectory%/apps/files_sharing/appinfo/Migrations
- %currentWorkingDirectory%/apps/files_trashbin/appinfo/Migrations
- %currentWorkingDirectory%/core/Migrations
- %currentWorkingDirectory%/tests/lib/Util/User
bootstrapFiles:
- %currentWorkingDirectory%/lib/base.php
excludes_analyse:
- %currentWorkingDirectory%/core/templates/*
- %currentWorkingDirectory%/core/routes.php
Expand All @@ -22,6 +12,13 @@ parameters:
- %currentWorkingDirectory%/apps/*/appinfo/routes.php
- %currentWorkingDirectory%/apps/*/composer/*
- %currentWorkingDirectory%/apps/*/3rdparty/*
- %currentWorkingDirectory%/apps/files_external/ajax/oauth2.php
- %currentWorkingDirectory%/apps/files_external/lib/Lib/Backend/DAV.php
- %currentWorkingDirectory%/apps/files_external/lib/Lib/Backend/Google.php
- %currentWorkingDirectory%/apps/files_external/lib/Lib/Backend/SMB.php
- %currentWorkingDirectory%/apps/files_external/lib/Lib/Backend/SMB_OC.php
- %currentWorkingDirectory%/apps/files_external/lib/Lib/Storage/Google.php
- %currentWorkingDirectory%/apps/files_external/lib/Lib/Storage/SMB.php
- %currentWorkingDirectory%/apps/files_external/3rdparty/aws-sdk-php/Symfony/Component/ClassLoader/Tests/Fixtures/Apc/fallback/Namespaced/FooBar.php
- %currentWorkingDirectory%/apps/files_sharing/ajax/shareinfo.php
- %currentWorkingDirectory%/settings/templates/*
Expand All @@ -32,7 +29,7 @@ parameters:
ignoreErrors:
- '#Undefined variable: \$OC_[a-zA-Z0-9\\_]+#'
- '#Undefined variable: \$vendor#'
- '#Undefined variable: \$baseuri#'
- '#Instantiated class Test\\Util\\User\\Dummy not found.#'
# errors below are to be addressed by own pull requests - non trivial changes required
- '#Unsafe usage of new static().#'
- '#Cannot instantiate interface OCP\\Files\\ObjectStore\\IObjectStore.#'
Expand Down

0 comments on commit 3f0decc

Please sign in to comment.