Skip to content

Conversation

@backportbot-nextcloud
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Nov 30, 2023

Backport of #41765 and #41924

@backportbot-nextcloud backportbot-nextcloud bot added feature: files pending documentation This pull request needs an associated documentation update php Pull requests that update Php code labels Nov 30, 2023
@backportbot-nextcloud backportbot-nextcloud bot added this to the Nextcloud 28 milestone Nov 30, 2023
$this->handleDeletion($event, $peerFile);
} elseif ($event instanceof CacheEntryRemovedEvent) {
$peerFile->delete();
} elseif ($event instanceof BeforeNodeRestoredEvent) {

Check failure

Code scanning / Psalm

RedundantCondition

Type OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent for $event is always OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent
}

if ($event instanceof BeforeNodeRenamedEvent) {
$this->handleMove($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleMove expects OCP\Files\File, but parent type OCP\Files\Node provided
if ($event instanceof BeforeNodeRenamedEvent) {
$this->handleMove($event, $peerFile);
} elseif ($event instanceof BeforeNodeDeletedEvent) {
$this->handleDeletion($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleDeletion expects OCP\Files\File, but parent type OCP\Files\Node provided
} elseif ($event instanceof CacheEntryRemovedEvent) {
$peerFile->delete();
} elseif ($event instanceof BeforeNodeRestoredEvent) {
$this->handleRestore($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleRestore expects OCP\Files\File, but parent type OCP\Files\Node provided
$event->abortOperation(new NotPermittedException("Cannot restore the video part of a live photo"));
}
} else {
$user = $this->userSession->getUser();

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getUser on possibly null value
@AndyScherzinger AndyScherzinger mentioned this pull request Nov 30, 2023
3 tasks
@artonge artonge force-pushed the backport/41765/stable28 branch from 766e45e to 86d88f6 Compare November 30, 2023 11:57
@artonge
Copy link
Contributor

artonge commented Nov 30, 2023

CI failure unrelated

@artonge artonge merged commit 996d94a into stable28 Nov 30, 2023
@artonge artonge deleted the backport/41765/stable28 branch November 30, 2023 14:42
@skjnldsv skjnldsv removed the pending documentation This pull request needs an associated documentation update label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: files php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants