Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment in SyncLivePhotosListener #41924

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Nov 30, 2023

No description provided.

@artonge artonge self-assigned this Nov 30, 2023
@artonge artonge added 3. to review Waiting for reviews technical debt php Pull requests that update Php code feature: files labels Nov 30, 2023
@artonge artonge added this to the Nextcloud 29 milestone Nov 30, 2023
$this->handleDeletion($event, $peerFile);
} elseif ($event instanceof CacheEntryRemovedEvent) {
$peerFile->delete();
} elseif ($event instanceof BeforeNodeRestoredEvent) {

Check failure

Code scanning / Psalm

RedundantCondition Error

Type OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent for $event is always OCA\Files_Trashbin\Events\BeforeNodeRestoredEvent
if (!str_ends_with($targetName, ".".$sourceExtension)) {
$event->abortOperation(new NotPermittedException("Cannot change the extension of a live photo"));
}
$this->handleMove($event, $peerFile);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion Note

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

Check notice

Code scanning / Psalm

ArgumentTypeCoercion Note

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 Note

Argument 2 of OCA\Files\Listener\SyncLivePhotosListener::handleRestore expects OCP\Files\File, but parent type OCP\Files\Node provided
apps/files/lib/Listener/SyncLivePhotosListener.php Dismissed Show dismissed Hide dismissed
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/debt/comment_sync_live_photos branch from a80f5f4 to e6bc34c Compare November 30, 2023 12:00
@artonge
Copy link
Contributor Author

artonge commented Nov 30, 2023

/backport to stable28

@artonge artonge merged commit e0d1e7c into master Nov 30, 2023
50 checks passed
@artonge artonge deleted the artonge/debt/comment_sync_live_photos branch November 30, 2023 16:33
@blizzz blizzz mentioned this pull request Mar 5, 2024
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 feature: files php Pull requests that update Php code technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants