diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-21 12:44:47 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:28:57 +0100 |
commit | af7bf98cbab882f8fa36c9551aef4bafd0e3495f (patch) | |
tree | 12a751993ca47766d8eff27319693420aea7f164 /lib | |
parent | 113756db30fcbffe9e90b54c29e78dee0676109f (diff) | |
download | nextcloud-server-af7bf98cbab882f8fa36c9551aef4bafd0e3495f.tar.gz nextcloud-server-af7bf98cbab882f8fa36c9551aef4bafd0e3495f.zip |
Fix Iterator return types
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
4 files changed, 6 insertions, 10 deletions
diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php index aea1ad6c3e9..6d26a40aef4 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php @@ -59,10 +59,7 @@ class ExcludeFileByNameFilterIterator extends \RecursiveFilterIterator { '/^\.webapp-nextcloud-(\d+\.){2}(\d+)(-r\d+)?$/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps. ]; - /** - * @return bool - */ - public function accept() { + public function accept(): bool { /** @var \SplFileInfo $current */ $current = $this->current(); diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php index fcdd3e3067c..120791f5b03 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php @@ -59,10 +59,7 @@ class ExcludeFoldersByPathFilterIterator extends \RecursiveFilterIterator { $this->excludedFolders = array_merge($excludedFolders, $appFolders); } - /** - * @return bool - */ - public function accept() { + public function accept(): bool { return !\in_array( $this->current()->getPathName(), $this->excludedFolders, diff --git a/lib/private/L10N/LanguageIterator.php b/lib/private/L10N/LanguageIterator.php index c48a27fb6ce..4a76667caf2 100644 --- a/lib/private/L10N/LanguageIterator.php +++ b/lib/private/L10N/LanguageIterator.php @@ -45,7 +45,7 @@ class LanguageIterator implements ILanguageIterator { /** * Rewind the Iterator to the first element */ - public function rewind() { + public function rewind(): void { $this->i = 0; } @@ -112,7 +112,7 @@ class LanguageIterator implements ILanguageIterator { * * @since 14.0.0 */ - public function next() { + public function next(): void { ++$this->i; } diff --git a/lib/public/L10N/ILanguageIterator.php b/lib/public/L10N/ILanguageIterator.php index 882c8bc6f9e..534d4229b1c 100644 --- a/lib/public/L10N/ILanguageIterator.php +++ b/lib/public/L10N/ILanguageIterator.php @@ -53,7 +53,9 @@ interface ILanguageIterator extends \Iterator { * Move forward to next element * * @since 14.0.0 + * @return void */ + #[\ReturnTypeWillChange] public function next(); /** |