summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-11 09:34:48 +0200
committerGitHub <noreply@github.com>2020-08-11 09:34:48 +0200
commitbc4df68e561b2f8879657c9caa749e742cf08a70 (patch)
treeff46fa9c369f4791046472ff2c520fa705e6cc42 /lib
parent24982808011df9d6aa14ced2d8790a18f4e2e747 (diff)
parentc0be7e329f8a68ac70efb741a58530678c19a721 (diff)
downloadnextcloud-server-bc4df68e561b2f8879657c9caa749e742cf08a70.tar.gz
nextcloud-server-bc4df68e561b2f8879657c9caa749e742cf08a70.zip
Merge pull request #22169 from nextcloud/enh/noid/prefer-typed-events
Prefer typed event over string based ones
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Security/CSP/ContentSecurityPolicyManager.php2
-rw-r--r--lib/private/Security/FeaturePolicy/FeaturePolicyManager.php2
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) {