Skip to content

Conversation

@PVince81
Copy link
Member

@PVince81 PVince81 commented Dec 19, 2022

Backport of #35500 to stable22

Reason: it might be necessary to repair encryption keys before upgrading


/**
* @param Folder $folder
* @return \Generator<File>

Check notice

Code scanning / Psalm

MoreSpecificReturnType

The declared return type 'Generator<mixed, OCP\Files\File, mixed, mixed>' for OCA\Encryption\Command\FixKeyLocation::getAllFiles is more specific than the inferred return type 'Generator<int|mixed, OCP\Files\File|OCP\Files\Node, mixed, void>'
protected function execute(InputInterface $input, OutputInterface $output): int {
$dryRun = $input->getOption('dry-run');
$userId = $input->getArgument('user');
$user = $this->userManager->get($userId);

Check notice

Code scanning / Psalm

PossiblyInvalidArgument

Argument 1 of OCP\IUserManager::get expects string, possibly different type array<array-key, string>|null|string provided
$userId = $input->getArgument('user');
$user = $this->userManager->get($userId);
if (!$user) {
$output->writeln("<error>User $userId not found</error>");

Check notice

Code scanning / Psalm

PossiblyInvalidCast

array<array-key, string> cannot be cast to string
Signed-off-by: Robin Appelman <[email protected]>
@icewind1991 icewind1991 merged commit 4fced6d into stable22 Dec 30, 2022
@icewind1991 icewind1991 deleted the backport/35107/stable22 branch December 30, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants