Skip to content

Commit bc46417

Browse files
committed
refactor: Apply rector changes
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent 712deec commit bc46417

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

β€Žlib/ACL/ACLManager.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function getPermissionsForPathFromRules(int $folderId, string $path, arra
164164
}
165165
}
166166

167-
uksort($filteredRules, static fn (string $a, string $b) => strlen($a) <=> strlen($b));
167+
uksort($filteredRules, static fn (string $a, string $b): int => strlen($a) <=> strlen($b));
168168

169169
return $this->calculatePermissionsForPath($folderId, $filteredRules);
170170
}

β€Žlib/Command/ExpireGroup/ExpireGroupBase.phpβ€Ž

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
* Base class for the group folder expiration commands.
1717
*/
1818
class ExpireGroupBase extends Base {
19-
public function __construct() {
20-
parent::__construct();
21-
}
22-
2319
#[\Override]
2420
protected function configure(): void {
2521
$this

β€Žlib/Command/ListCommand.phpβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8888
$folder['size'] = $folder['root_cache_entry']->getSize();
8989
unset($folder['root_cache_entry']);
9090
$folder['groups_list'] = array_map(fn (array $group): int => $group['permissions'], $folder['groups']);
91-
$folder['options'] = $folder['options'];
9291
$folder['mountPoint'] = $folder['mount_point'];
9392
unset($folder['mount_point']);
9493
$folder['rootId'] = $folder['root_id'];

β€Žlib/Folder/FolderManager.phpβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ public function searchGroups(int $id, string $search = ''): array {
544544
return $groups;
545545
}
546546

547-
return array_values(array_filter($groups, fn (array $group): bool => (stripos($group['gid'], $search) !== false) || (stripos($group['displayname'], $search) !== false)));
547+
return array_values(array_filter($groups, fn (array $group): bool => (stripos((string)$group['gid'], $search) !== false) || (stripos((string)$group['displayname'], $search) !== false)));
548548
}
549549

550550
/**
@@ -557,7 +557,7 @@ public function searchCircles(int $id, string $search = ''): array {
557557
return $circles;
558558
}
559559

560-
return array_values(array_filter($circles, fn (array $circle): bool => (stripos($circle['displayname'], $search) !== false)));
560+
return array_values(array_filter($circles, fn (array $circle): bool => (stripos((string)$circle['displayname'], $search) !== false)));
561561
}
562562

563563
/**

β€Žlib/Trash/TrashManager.phpβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public function listTrashForFolders(array $folderIds): array {
3434

3535
return array_map(fn (array $row): array => [
3636
'trash_id' => (int)$row['trash_id'],
37-
'name' => (string)$row['name'],
37+
'name' => $row['name'],
3838
'deleted_time' => (int)$row['deleted_time'],
39-
'original_location' => (string)$row['original_location'],
39+
'original_location' => $row['original_location'],
4040
'folder_id' => (int)$row['folder_id'],
4141
'file_id' => $row['file_id'] !== null ? (int)$row['file_id'] : null,
42-
'deleted_by' => $row['deleted_by'] !== null ? (string)$row['deleted_by'] : null,
42+
'deleted_by' => $row['deleted_by'] ?? null,
4343
], $rows);
4444
}
4545

0 commit comments

Comments
Β (0)