-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix!: Final round of moving to IEventDispatcher #39605
Conversation
30b5d64
to
f9b3e16
Compare
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
f9b3e16
to
3962cd0
Compare
@@ -112,7 +113,7 @@ | |||
private function callForRegistrations() { | |||
static $eventSent = false; | |||
if (!$eventSent) { | |||
\OC::$server->getEventDispatcher()->dispatch( | |||
\OC::$server->get(IEventDispatcher::class)->dispatch( |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹
if ($addToFavorite) { | ||
$event = new NodeAddedToFavorite($user, $fileId, $path); | ||
} else { | ||
$event = new NodeRemovedFromFavorite($user, $fileId, $path); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
$event = $addToFavorite
? new NodeAddedToFavorite($user, $fileId, $path);
: new NodeRemovedFromFavorite($user, $fileId, $path);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a fan of inline-if when generating objects 🙈
Checklist