Fix Iterator return types

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2021-10-21 12:44:47 +02:00
parent 113756db30
commit af7bf98cba
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
4 changed files with 6 additions and 10 deletions

View file

@ -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();

View file

@ -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,

View file

@ -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;
}

View file

@ -53,7 +53,9 @@ interface ILanguageIterator extends \Iterator {
* Move forward to next element
*
* @since 14.0.0
* @return void
*/
#[\ReturnTypeWillChange]
public function next();
/**