diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-07-10 12:07:08 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2023-07-10 12:42:30 +0200 |
commit | 2ca8c7102bcf65d3f5ce58696d9bade504416c87 (patch) | |
tree | a2e03b4989669670f0432ff3b08dd91bed612634 | |
parent | 33b9ba5cd9d305ec15dc37f0650402d25c019066 (diff) | |
download | nextcloud-server-2ca8c7102bcf65d3f5ce58696d9bade504416c87.tar.gz nextcloud-server-2ca8c7102bcf65d3f5ce58696d9bade504416c87.zip |
fix: PHP 7.4 compatibility
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 files changed, 9 insertions, 4 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 1c6727e68ca..8ae457b2e59 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -442,7 +442,11 @@ class FilesReportPlugin extends ServerPlugin { return $results; } - protected function wrapNode(\OCP\Files\File|\OCP\Files\Folder $node): File|Directory { + /** + * @param \OCP\Files\File|\OCP\Files\Folder $node + * @return File|Directory + */ + protected function wrapNode($node): \OCA\DAV\Connector\Sabre\Node { if ($node instanceof \OCP\Files\File) { return new File($this->fileView, $node); } else { diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php index 2bbe7bef6de..db355d6500c 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php @@ -66,7 +66,8 @@ class FilesReportPluginTest extends \Test\TestCase { /** @var ITags|MockObject */ private $privateTags; - private ITagManager|MockObject $privateTagManager; + /** @var ITagManager|MockObject|(object&MockObject)|(ITagManager&object&MockObject)|(ITagManager&MockObject) */ + private $privateTagManager; /** @var \OCP\IUserSession */ private $userSession; diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index 8732769040e..df89f1261a3 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -64,7 +64,7 @@ class QuerySearchHelper { LoggerInterface $logger, SearchBuilder $searchBuilder, QueryOptimizer $queryOptimizer, - IGroupManager $groupManager, + IGroupManager $groupManager ) { $this->mimetypeLoader = $mimetypeLoader; $this->connection = $connection; diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 9f84993000f..cb97c5a6d32 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -331,7 +331,7 @@ class Folder extends Node implements \OCP\Files\Folder { * @param int $id * @return array */ - protected function getByIdInRootMount(int $id): array { + protected function getByIdInRootMount(int $id): array { if (!method_exists($this->root, 'createNode')) { // Always expected to be false. Being a method of Folder, this is // always implemented. For it is an internal method and should not |