From c0be7e329f8a68ac70efb741a58530678c19a721 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 10 Aug 2020 14:29:21 +0200 Subject: Prefer typed event over string based ones Signed-off-by: Morris Jobke --- apps/files/lib/Controller/ViewController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apps/files/lib/Controller/ViewController.php') 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()); -- cgit v1.2.3