Browse Source
Fix Iterator return types
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/29432/head
Côme Chilliet
5 years ago
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
4 changed files with
6 additions and
10 deletions
-
lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php
-
lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php
-
lib/private/L10N/LanguageIterator.php
-
lib/public/L10N/ILanguageIterator.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(); |
|
|
|
|
|
|
|
|
|
|
|
@ -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, |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -53,7 +53,9 @@ interface ILanguageIterator extends \Iterator { |
|
|
|
* Move forward to next element |
|
|
|
* |
|
|
|
* @since 14.0.0 |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
#[\ReturnTypeWillChange]
|
|
|
|
public function next(); |
|
|
|
|
|
|
|
/** |
|
|
|
|