Skip to content

Commit

Permalink
fix: Fix namespaces and typo in variable names
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Feb 4, 2025
1 parent 5abf17d commit f869f06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ private function getAppDirectories(): array {
* Gets the recursive directory iterator over the Nextcloud folder
*
* @param list<string> $excludedPaths Name of root directories to skip
* @return Generator<string, \SplFileInfo>
* @return \Generator<string, \SplFileInfo>
*/
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');
}
Expand All @@ -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);
}


Expand Down Expand Up @@ -908,7 +908,7 @@ public function deleteOldFiles(): void {
/**
* Moves the specified files except the excluded elements to the correct position
*
* @param list<string> $excludedPaths Name of root directories to skip
* @param list<string> $excludedElements Name of root directories to skip
* @throws \Exception
*/
private function moveWithExclusions(string $dataLocation, array $excludedElements): void {
Expand Down
10 changes: 5 additions & 5 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ private function getAppDirectories(): array {
* Gets the recursive directory iterator over the Nextcloud folder
*
* @param list<string> $excludedPaths Name of root directories to skip
* @return Generator<string, \SplFileInfo>
* @return \Generator<string, \SplFileInfo>
*/
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');
}
Expand All @@ -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);
}


Expand Down Expand Up @@ -890,7 +890,7 @@ public function deleteOldFiles(): void {
/**
* Moves the specified files except the excluded elements to the correct position
*
* @param list<string> $excludedPaths Name of root directories to skip
* @param list<string> $excludedElements Name of root directories to skip
* @throws \Exception
*/
private function moveWithExclusions(string $dataLocation, array $excludedElements): void {
Expand Down
Binary file modified updater.phar
Binary file not shown.

0 comments on commit f869f06

Please sign in to comment.