aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php')
-rw-r--r--lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php32
1 files changed, 5 insertions, 27 deletions
diff --git a/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php b/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php
index fd0d2707f8d..0a90b49f0f1 100644
--- a/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php
+++ b/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php
@@ -1,26 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2021, Nextcloud GmbH.
- *
- * @author Robin Appelman <robin@icewind.nl>
- * @author Vincent Petry <vincent@nextcloud.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OC\Files\Storage\Wrapper;
use Icewind\Streams\DirectoryWrapper;
@@ -30,11 +13,7 @@ use OC\Files\Filesystem;
* Normalize file names while reading directory entries
*/
class EncodingDirectoryWrapper extends DirectoryWrapper {
- /**
- * @psalm-suppress ImplementedReturnTypeMismatch Until return type is fixed upstream
- * @return string|false
- */
- public function dir_readdir() {
+ public function dir_readdir(): string|false {
$file = readdir($this->source);
if ($file !== false && $file !== '.' && $file !== '..') {
$file = trim(Filesystem::normalizePath($file), '/');
@@ -45,8 +24,7 @@ class EncodingDirectoryWrapper extends DirectoryWrapper {
/**
* @param resource $source
- * @param callable $filter
- * @return resource|bool
+ * @return resource|false
*/
public static function wrap($source) {
return self::wrapSource($source, [