mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Fix Iterator return types
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
113756db30
commit
af7bf98cba
4 changed files with 6 additions and 10 deletions
|
|
@ -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();
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue