diff --git a/index.php b/index.php index 0dd624a5..e8e8f6c3 100644 --- a/index.php +++ b/index.php @@ -292,10 +292,10 @@ private function getAppDirectories(): array { * Gets the recursive directory iterator over the Nextcloud folder * * @param list $excludedPaths Name of root directories to skip - * @return Generator + * @return \Generator */ - private function getRecursiveDirectoryIterator(string $folder, array $excludedPaths): Generator { - foreach ($excludedElements as $element) { + private function getRecursiveDirectoryIterator(string $folder, array $excludedPaths): \Generator { + foreach ($excludedPaths as $element) { if (strpos($element, '/') !== false) { throw new \Exception('Excluding subpaths is not supported yet'); } @@ -311,7 +311,7 @@ private function getRecursiveDirectoryIterator(string $folder, array $excludedPa } $path = $folder.'/'.$name; yield from $this->getRecursiveDirectoryIterator($path, []); - yield $path => new SplFileInfo($path); + yield $path => new \SplFileInfo($path); } @@ -908,7 +908,7 @@ public function deleteOldFiles(): void { /** * Moves the specified files except the excluded elements to the correct position * - * @param list $excludedPaths Name of root directories to skip + * @param list $excludedElements Name of root directories to skip * @throws \Exception */ private function moveWithExclusions(string $dataLocation, array $excludedElements): void { diff --git a/lib/Updater.php b/lib/Updater.php index a45a350f..02fc3a4b 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -274,10 +274,10 @@ private function getAppDirectories(): array { * Gets the recursive directory iterator over the Nextcloud folder * * @param list $excludedPaths Name of root directories to skip - * @return Generator + * @return \Generator */ - private function getRecursiveDirectoryIterator(string $folder, array $excludedPaths): Generator { - foreach ($excludedElements as $element) { + private function getRecursiveDirectoryIterator(string $folder, array $excludedPaths): \Generator { + foreach ($excludedPaths as $element) { if (strpos($element, '/') !== false) { throw new \Exception('Excluding subpaths is not supported yet'); } @@ -293,7 +293,7 @@ private function getRecursiveDirectoryIterator(string $folder, array $excludedPa } $path = $folder.'/'.$name; yield from $this->getRecursiveDirectoryIterator($path, []); - yield $path => new SplFileInfo($path); + yield $path => new \SplFileInfo($path); } @@ -890,7 +890,7 @@ public function deleteOldFiles(): void { /** * Moves the specified files except the excluded elements to the correct position * - * @param list $excludedPaths Name of root directories to skip + * @param list $excludedElements Name of root directories to skip * @throws \Exception */ private function moveWithExclusions(string $dataLocation, array $excludedElements): void { diff --git a/updater.phar b/updater.phar index 30f36c88..a2d849d7 100755 Binary files a/updater.phar and b/updater.phar differ