diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-10 14:29:21 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-10 15:22:55 +0200 |
commit | c0be7e329f8a68ac70efb741a58530678c19a721 (patch) | |
tree | 49814c1be13ec6fef64227e930a8530c093c5db6 /lib/private/Security | |
parent | 9c1ee2e0ba84e7ad1f707bdf6080ec3df1680040 (diff) | |
download | nextcloud-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 'lib/private/Security')
-rw-r--r-- | lib/private/Security/CSP/ContentSecurityPolicyManager.php | 2 | ||||
-rw-r--r-- | lib/private/Security/FeaturePolicy/FeaturePolicyManager.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Security/CSP/ContentSecurityPolicyManager.php b/lib/private/Security/CSP/ContentSecurityPolicyManager.php index e0403e77936..47ba7ae4e01 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicyManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyManager.php @@ -57,7 +57,7 @@ class ContentSecurityPolicyManager implements IContentSecurityPolicyManager { */ public function getDefaultPolicy(): ContentSecurityPolicy { $event = new AddContentSecurityPolicyEvent($this); - $this->dispatcher->dispatch(AddContentSecurityPolicyEvent::class, $event); + $this->dispatcher->dispatchTyped($event); $defaultPolicy = new \OC\Security\CSP\ContentSecurityPolicy(); foreach ($this->policies as $policy) { diff --git a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php index 6143a5b95fc..c912c8480a4 100644 --- a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php +++ b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php @@ -47,7 +47,7 @@ class FeaturePolicyManager { public function getDefaultPolicy(): FeaturePolicy { $event = new AddFeaturePolicyEvent($this); - $this->dispatcher->dispatch(AddFeaturePolicyEvent::class, $event); + $this->dispatcher->dispatchTyped($event); $defaultPolicy = new FeaturePolicy(); foreach ($this->policies as $policy) { |