From f869f0602e9eef957c9d26824b138438bf3a88ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 4 Feb 2025 15:17:20 +0100 Subject: [PATCH] fix: Fix namespaces and typo in variable names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- index.php | 10 +++++----- lib/Updater.php | 10 +++++----- updater.phar | Bin 1167214 -> 1167217 bytes 3 files changed, 10 insertions(+), 10 deletions(-) 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 30f36c88ab19dfc39f74a7eca2efd23f873b1e1e..a2d849d7fd5daf3efa5abcbb431d03a6fc5c3e16 100755 GIT binary patch delta 258 zcmaDi&;8>(_X+cP5|fis(@f2ij7?08CayL{<-ZC-;cxa}Y_(1i@q5U0DSKWFfzt$7f}=Z=gsb#lbV~FSF&BKNYEx$M*7#AH$N?k_#Uh>UpX&lcZ!VJHa{ky Jo86s!odDpLQ5OIJ delta 272 zcmex3&;8vz_X+cPk}T8G%u|e0&CCsxCayL{<-ZC-;cxa}Y_()5yJ*fRn#6A&{4F$)m00x=s9vjZ^)5OV@C7Z7s;F%J;)0x=&D^KaL& z7jQbtWulv&WMph^l$yA`f<;hPe)=?J!5Ve<)V$Q9#FG3Xg=#KN&b0iZ)WqZr1r3$d zisYQql++a0oYdUZyprwaDuQ