summaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-10 14:29:21 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-10 15:22:55 +0200
commitc0be7e329f8a68ac70efb741a58530678c19a721 (patch)
tree49814c1be13ec6fef64227e930a8530c093c5db6 /apps/files/lib/Controller
parent9c1ee2e0ba84e7ad1f707bdf6080ec3df1680040 (diff)
downloadnextcloud-server-c0be7e329f8a68ac70efb741a58530678c19a721.tar.gz
nextcloud-server-c0be7e329f8a68ac70efb741a58530678c19a721.zip
Prefer typed event over string based ones
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r--apps/files/lib/Controller/ViewController.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 73ee589fdbc..1568e0c9f54 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -278,9 +278,8 @@ class ViewController extends Controller {
}
$event = new LoadAdditionalScriptsEvent();
- $this->eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, $event);
-
- $this->eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar());
+ $this->eventDispatcher->dispatchTyped($event);
+ $this->eventDispatcher->dispatchTyped(new LoadSidebar());
// Load Viewer scripts
if (class_exists(LoadViewer::class)) {
$this->eventDispatcher->dispatchTyped(new LoadViewer());