Passed
Push — master ( 902645...6d7fee )
by Joas
15:37 queued 12s
created
lib/public/Calendar/IMetadataProvider.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -33,33 +33,33 @@
 block discarded – undo
33 33
  */
34 34
 interface IMetadataProvider {
35 35
 
36
-	/**
37
-	 * Get a list of all metadata keys available for this room
38
-	 *
39
-	 * Room backends are allowed to return custom keys, beyond the ones
40
-	 * defined in this class. If they do, they should make sure to use their
41
-	 * own namespace.
42
-	 *
43
-	 * @return String[] - A list of available keys
44
-	 * @since 17.0.0
45
-	 */
46
-	public function getAllAvailableMetadataKeys():array;
36
+    /**
37
+     * Get a list of all metadata keys available for this room
38
+     *
39
+     * Room backends are allowed to return custom keys, beyond the ones
40
+     * defined in this class. If they do, they should make sure to use their
41
+     * own namespace.
42
+     *
43
+     * @return String[] - A list of available keys
44
+     * @since 17.0.0
45
+     */
46
+    public function getAllAvailableMetadataKeys():array;
47 47
 
48
-	/**
49
-	 * Get whether or not a metadata key is set for this room
50
-	 *
51
-	 * @param string $key - The key to check for
52
-	 * @return bool - Whether or not key is available
53
-	 * @since 17.0.0
54
-	 */
55
-	public function hasMetadataForKey(string $key):bool;
48
+    /**
49
+     * Get whether or not a metadata key is set for this room
50
+     *
51
+     * @param string $key - The key to check for
52
+     * @return bool - Whether or not key is available
53
+     * @since 17.0.0
54
+     */
55
+    public function hasMetadataForKey(string $key):bool;
56 56
 
57
-	/**
58
-	 * Get the value for a metadata key
59
-	 *
60
-	 * @param string $key - The key to check for
61
-	 * @return string|null - The value stored for the key, null if no value stored
62
-	 * @since 17.0.0
63
-	 */
64
-	public function getMetadataForKey(string $key):?string;
57
+    /**
58
+     * Get the value for a metadata key
59
+     *
60
+     * @param string $key - The key to check for
61
+     * @return string|null - The value stored for the key, null if no value stored
62
+     * @since 17.0.0
63
+     */
64
+    public function getMetadataForKey(string $key):?string;
65 65
 }
Please login to merge, or discard this patch.
lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -38,33 +38,33 @@
 block discarded – undo
38 38
 
39 39
 class FeaturePolicyMiddleware extends Middleware {
40 40
 
41
-	/** @var FeaturePolicyManager */
42
-	private $policyManager;
41
+    /** @var FeaturePolicyManager */
42
+    private $policyManager;
43 43
 
44
-	public function __construct(FeaturePolicyManager $policyManager) {
45
-		$this->policyManager = $policyManager;
46
-	}
44
+    public function __construct(FeaturePolicyManager $policyManager) {
45
+        $this->policyManager = $policyManager;
46
+    }
47 47
 
48
-	/**
49
-	 * Performs the default FeaturePolicy modifications that may be injected by other
50
-	 * applications
51
-	 *
52
-	 * @param Controller $controller
53
-	 * @param string $methodName
54
-	 * @param Response $response
55
-	 * @return Response
56
-	 */
57
-	public function afterController($controller, $methodName, Response $response): Response {
58
-		$policy = !is_null($response->getFeaturePolicy()) ? $response->getFeaturePolicy() : new FeaturePolicy();
48
+    /**
49
+     * Performs the default FeaturePolicy modifications that may be injected by other
50
+     * applications
51
+     *
52
+     * @param Controller $controller
53
+     * @param string $methodName
54
+     * @param Response $response
55
+     * @return Response
56
+     */
57
+    public function afterController($controller, $methodName, Response $response): Response {
58
+        $policy = !is_null($response->getFeaturePolicy()) ? $response->getFeaturePolicy() : new FeaturePolicy();
59 59
 
60
-		if (get_class($policy) === EmptyFeaturePolicy::class) {
61
-			return $response;
62
-		}
60
+        if (get_class($policy) === EmptyFeaturePolicy::class) {
61
+            return $response;
62
+        }
63 63
 
64
-		$defaultPolicy = $this->policyManager->getDefaultPolicy();
65
-		$defaultPolicy = $this->policyManager->mergePolicies($defaultPolicy, $policy);
66
-		$response->setFeaturePolicy($defaultPolicy);
64
+        $defaultPolicy = $this->policyManager->getDefaultPolicy();
65
+        $defaultPolicy = $this->policyManager->mergePolicies($defaultPolicy, $policy);
66
+        $response->setFeaturePolicy($defaultPolicy);
67 67
 
68
-		return $response;
69
-	}
68
+        return $response;
69
+    }
70 70
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/EmptyFeaturePolicy.php 1 patch
Indentation   +143 added lines, -143 removed lines patch added patch discarded remove patch
@@ -37,147 +37,147 @@
 block discarded – undo
37 37
  */
38 38
 class EmptyFeaturePolicy {
39 39
 
40
-	/** @var string[] of allowed domains to autoplay media */
41
-	protected $autoplayDomains = null;
42
-
43
-	/** @var string[] of allowed domains that can access the camera */
44
-	protected $cameraDomains = null;
45
-
46
-	/** @var string[] of allowed domains that can use fullscreen */
47
-	protected $fullscreenDomains = null;
48
-
49
-	/** @var string[] of allowed domains that can use the geolocation of the device */
50
-	protected $geolocationDomains = null;
51
-
52
-	/** @var string[] of allowed domains that can use the microphone */
53
-	protected $microphoneDomains = null;
54
-
55
-	/** @var string[] of allowed domains that can use the payment API */
56
-	protected $paymentDomains = null;
57
-
58
-	/**
59
-	 * Allows to use autoplay from a specific domain. Use * to allow from all domains.
60
-	 *
61
-	 * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
62
-	 * @return $this
63
-	 * @since 17.0.0
64
-	 */
65
-	public function addAllowedAutoplayDomain(string $domain): self {
66
-		$this->autoplayDomains[] = $domain;
67
-		return $this;
68
-	}
69
-
70
-	/**
71
-	 * Allows to use the camera on a specific domain. Use * to allow from all domains
72
-	 *
73
-	 * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
74
-	 * @return $this
75
-	 * @since 17.0.0
76
-	 */
77
-	public function addAllowedCameraDomain(string $domain): self {
78
-		$this->cameraDomains[] = $domain;
79
-		return $this;
80
-	}
81
-
82
-	/**
83
-	 * Allows the full screen functionality to be used on a specific domain. Use * to allow from all domains
84
-	 *
85
-	 * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
86
-	 * @return $this
87
-	 * @since 17.0.0
88
-	 */
89
-	public function addAllowedFullScreenDomain(string $domain): self {
90
-		$this->fullscreenDomains[] = $domain;
91
-		return $this;
92
-	}
93
-
94
-	/**
95
-	 * Allows to use the geolocation on a specific domain. Use * to allow from all domains
96
-	 *
97
-	 * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
98
-	 * @return $this
99
-	 * @since 17.0.0
100
-	 */
101
-	public function addAllowedGeoLocationDomain(string $domain): self {
102
-		$this->geolocationDomains[] = $domain;
103
-		return $this;
104
-	}
105
-
106
-	/**
107
-	 * Allows to use the microphone on a specific domain. Use * to allow from all domains
108
-	 *
109
-	 * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
110
-	 * @return $this
111
-	 * @since 17.0.0
112
-	 */
113
-	public function addAllowedMicrophoneDomain(string $domain): self {
114
-		$this->microphoneDomains[] = $domain;
115
-		return $this;
116
-	}
117
-
118
-	/**
119
-	 * Allows to use the payment API on a specific domain. Use * to allow from all domains
120
-	 *
121
-	 * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
122
-	 * @return $this
123
-	 * @since 17.0.0
124
-	 */
125
-	public function addAllowedPaymentDomain(string $domain): self {
126
-		$this->paymentDomains[] = $domain;
127
-		return $this;
128
-	}
129
-
130
-	/**
131
-	 * Get the generated Feature-Policy as a string
132
-	 *
133
-	 * @return string
134
-	 * @since 17.0.0
135
-	 */
136
-	public function buildPolicy(): string {
137
-		$policy = '';
138
-
139
-		if (empty($this->autoplayDomains)) {
140
-			$policy .= "autoplay 'none';";
141
-		} else {
142
-			$policy .= 'autoplay ' . implode(' ', $this->autoplayDomains);
143
-			$policy .= ';';
144
-		}
145
-
146
-		if (empty($this->cameraDomains)) {
147
-			$policy .= "camera 'none';";
148
-		} else {
149
-			$policy .= 'camera ' . implode(' ', $this->cameraDomains);
150
-			$policy .= ';';
151
-		}
152
-
153
-		if (empty($this->fullscreenDomains)) {
154
-			$policy .= "fullscreen 'none';";
155
-		} else {
156
-			$policy .= 'fullscreen ' . implode(' ', $this->fullscreenDomains);
157
-			$policy .= ';';
158
-		}
159
-
160
-		if (empty($this->geolocationDomains)) {
161
-			$policy .= "geolocation 'none';";
162
-		} else {
163
-			$policy .= 'geolocation ' . implode(' ', $this->geolocationDomains);
164
-			$policy .= ';';
165
-		}
166
-
167
-		if (empty($this->microphoneDomains)) {
168
-			$policy .= "microphone 'none';";
169
-		} else {
170
-			$policy .= 'microphone ' . implode(' ', $this->microphoneDomains);
171
-			$policy .= ';';
172
-		}
173
-
174
-		if (empty($this->paymentDomains)) {
175
-			$policy .= "payment 'none';";
176
-		} else {
177
-			$policy .= 'payment ' . implode(' ', $this->paymentDomains);
178
-			$policy .= ';';
179
-		}
180
-
181
-		return rtrim($policy, ';');
182
-	}
40
+    /** @var string[] of allowed domains to autoplay media */
41
+    protected $autoplayDomains = null;
42
+
43
+    /** @var string[] of allowed domains that can access the camera */
44
+    protected $cameraDomains = null;
45
+
46
+    /** @var string[] of allowed domains that can use fullscreen */
47
+    protected $fullscreenDomains = null;
48
+
49
+    /** @var string[] of allowed domains that can use the geolocation of the device */
50
+    protected $geolocationDomains = null;
51
+
52
+    /** @var string[] of allowed domains that can use the microphone */
53
+    protected $microphoneDomains = null;
54
+
55
+    /** @var string[] of allowed domains that can use the payment API */
56
+    protected $paymentDomains = null;
57
+
58
+    /**
59
+     * Allows to use autoplay from a specific domain. Use * to allow from all domains.
60
+     *
61
+     * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
62
+     * @return $this
63
+     * @since 17.0.0
64
+     */
65
+    public function addAllowedAutoplayDomain(string $domain): self {
66
+        $this->autoplayDomains[] = $domain;
67
+        return $this;
68
+    }
69
+
70
+    /**
71
+     * Allows to use the camera on a specific domain. Use * to allow from all domains
72
+     *
73
+     * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
74
+     * @return $this
75
+     * @since 17.0.0
76
+     */
77
+    public function addAllowedCameraDomain(string $domain): self {
78
+        $this->cameraDomains[] = $domain;
79
+        return $this;
80
+    }
81
+
82
+    /**
83
+     * Allows the full screen functionality to be used on a specific domain. Use * to allow from all domains
84
+     *
85
+     * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
86
+     * @return $this
87
+     * @since 17.0.0
88
+     */
89
+    public function addAllowedFullScreenDomain(string $domain): self {
90
+        $this->fullscreenDomains[] = $domain;
91
+        return $this;
92
+    }
93
+
94
+    /**
95
+     * Allows to use the geolocation on a specific domain. Use * to allow from all domains
96
+     *
97
+     * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
98
+     * @return $this
99
+     * @since 17.0.0
100
+     */
101
+    public function addAllowedGeoLocationDomain(string $domain): self {
102
+        $this->geolocationDomains[] = $domain;
103
+        return $this;
104
+    }
105
+
106
+    /**
107
+     * Allows to use the microphone on a specific domain. Use * to allow from all domains
108
+     *
109
+     * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
110
+     * @return $this
111
+     * @since 17.0.0
112
+     */
113
+    public function addAllowedMicrophoneDomain(string $domain): self {
114
+        $this->microphoneDomains[] = $domain;
115
+        return $this;
116
+    }
117
+
118
+    /**
119
+     * Allows to use the payment API on a specific domain. Use * to allow from all domains
120
+     *
121
+     * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
122
+     * @return $this
123
+     * @since 17.0.0
124
+     */
125
+    public function addAllowedPaymentDomain(string $domain): self {
126
+        $this->paymentDomains[] = $domain;
127
+        return $this;
128
+    }
129
+
130
+    /**
131
+     * Get the generated Feature-Policy as a string
132
+     *
133
+     * @return string
134
+     * @since 17.0.0
135
+     */
136
+    public function buildPolicy(): string {
137
+        $policy = '';
138
+
139
+        if (empty($this->autoplayDomains)) {
140
+            $policy .= "autoplay 'none';";
141
+        } else {
142
+            $policy .= 'autoplay ' . implode(' ', $this->autoplayDomains);
143
+            $policy .= ';';
144
+        }
145
+
146
+        if (empty($this->cameraDomains)) {
147
+            $policy .= "camera 'none';";
148
+        } else {
149
+            $policy .= 'camera ' . implode(' ', $this->cameraDomains);
150
+            $policy .= ';';
151
+        }
152
+
153
+        if (empty($this->fullscreenDomains)) {
154
+            $policy .= "fullscreen 'none';";
155
+        } else {
156
+            $policy .= 'fullscreen ' . implode(' ', $this->fullscreenDomains);
157
+            $policy .= ';';
158
+        }
159
+
160
+        if (empty($this->geolocationDomains)) {
161
+            $policy .= "geolocation 'none';";
162
+        } else {
163
+            $policy .= 'geolocation ' . implode(' ', $this->geolocationDomains);
164
+            $policy .= ';';
165
+        }
166
+
167
+        if (empty($this->microphoneDomains)) {
168
+            $policy .= "microphone 'none';";
169
+        } else {
170
+            $policy .= 'microphone ' . implode(' ', $this->microphoneDomains);
171
+            $policy .= ';';
172
+        }
173
+
174
+        if (empty($this->paymentDomains)) {
175
+            $policy .= "payment 'none';";
176
+        } else {
177
+            $policy .= 'payment ' . implode(' ', $this->paymentDomains);
178
+            $policy .= ';';
179
+        }
180
+
181
+        return rtrim($policy, ';');
182
+    }
183 183
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/FeaturePolicy.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,23 +37,23 @@
 block discarded – undo
37 37
  * @since 17.0.0
38 38
  */
39 39
 class FeaturePolicy extends EmptyFeaturePolicy {
40
-	protected $autoplayDomains = [
41
-		'\'self\'',
42
-	];
40
+    protected $autoplayDomains = [
41
+        '\'self\'',
42
+    ];
43 43
 
44
-	/** @var string[] of allowed domains that can access the camera */
45
-	protected $cameraDomains = [];
44
+    /** @var string[] of allowed domains that can access the camera */
45
+    protected $cameraDomains = [];
46 46
 
47
-	protected $fullscreenDomains = [
48
-		'\'self\'',
49
-	];
47
+    protected $fullscreenDomains = [
48
+        '\'self\'',
49
+    ];
50 50
 
51
-	/** @var string[] of allowed domains that can use the geolocation of the device */
52
-	protected $geolocationDomains = [];
51
+    /** @var string[] of allowed domains that can use the geolocation of the device */
52
+    protected $geolocationDomains = [];
53 53
 
54
-	/** @var string[] of allowed domains that can use the microphone */
55
-	protected $microphoneDomains = [];
54
+    /** @var string[] of allowed domains that can use the microphone */
55
+    protected $microphoneDomains = [];
56 56
 
57
-	/** @var string[] of allowed domains that can use the payment API */
58
-	protected $paymentDomains = [];
57
+    /** @var string[] of allowed domains that can use the payment API */
58
+    protected $paymentDomains = [];
59 59
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Proxy/Proxy.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,16 +36,16 @@
 block discarded – undo
36 36
  */
37 37
 class Proxy extends Entity {
38 38
 
39
-	/** @var string */
40
-	protected $ownerId;
41
-	/** @var string */
42
-	protected $proxyId;
43
-	/** @var int */
44
-	protected $permissions;
39
+    /** @var string */
40
+    protected $ownerId;
41
+    /** @var string */
42
+    protected $proxyId;
43
+    /** @var int */
44
+    protected $permissions;
45 45
 
46
-	public function __construct() {
47
-		$this->addType('ownerId', 'string');
48
-		$this->addType('proxyId', 'string');
49
-		$this->addType('permissions', 'int');
50
-	}
46
+    public function __construct() {
47
+        $this->addType('ownerId', 'string');
48
+        $this->addType('proxyId', 'string');
49
+        $this->addType('permissions', 'int');
50
+    }
51 51
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@
 block discarded – undo
35 35
  */
36 36
 class ResourcePrincipalBackend extends AbstractPrincipalBackend {
37 37
 
38
-	/**
39
-	 * ResourcePrincipalBackend constructor.
40
-	 *
41
-	 * @param IDBConnection $dbConnection
42
-	 * @param IUserSession $userSession
43
-	 * @param IGroupManager $groupManager
44
-	 * @param ILogger $logger
45
-	 * @param ProxyMapper $proxyMapper
46
-	 */
47
-	public function __construct(IDBConnection $dbConnection,
48
-								IUserSession $userSession,
49
-								IGroupManager $groupManager,
50
-								ILogger $logger,
51
-								ProxyMapper $proxyMapper) {
52
-		parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
-			$proxyMapper, 'principals/calendar-resources', 'resource', 'RESOURCE');
54
-	}
38
+    /**
39
+     * ResourcePrincipalBackend constructor.
40
+     *
41
+     * @param IDBConnection $dbConnection
42
+     * @param IUserSession $userSession
43
+     * @param IGroupManager $groupManager
44
+     * @param ILogger $logger
45
+     * @param ProxyMapper $proxyMapper
46
+     */
47
+    public function __construct(IDBConnection $dbConnection,
48
+                                IUserSession $userSession,
49
+                                IGroupManager $groupManager,
50
+                                ILogger $logger,
51
+                                ProxyMapper $proxyMapper) {
52
+        parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
+            $proxyMapper, 'principals/calendar-resources', 'resource', 'RESOURCE');
54
+    }
55 55
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@
 block discarded – undo
35 35
  */
36 36
 class RoomPrincipalBackend extends AbstractPrincipalBackend {
37 37
 
38
-	/**
39
-	 * RoomPrincipalBackend constructor.
40
-	 *
41
-	 * @param IDBConnection $dbConnection
42
-	 * @param IUserSession $userSession
43
-	 * @param IGroupManager $groupManager
44
-	 * @param ILogger $logger
45
-	 * @param ProxyMapper $proxyMapper
46
-	 */
47
-	public function __construct(IDBConnection $dbConnection,
48
-								IUserSession $userSession,
49
-								IGroupManager $groupManager,
50
-								ILogger $logger,
51
-								ProxyMapper $proxyMapper) {
52
-		parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
-			$proxyMapper, 'principals/calendar-rooms', 'room', 'ROOM');
54
-	}
38
+    /**
39
+     * RoomPrincipalBackend constructor.
40
+     *
41
+     * @param IDBConnection $dbConnection
42
+     * @param IUserSession $userSession
43
+     * @param IGroupManager $groupManager
44
+     * @param ILogger $logger
45
+     * @param ProxyMapper $proxyMapper
46
+     */
47
+    public function __construct(IDBConnection $dbConnection,
48
+                                IUserSession $userSession,
49
+                                IGroupManager $groupManager,
50
+                                ILogger $logger,
51
+                                ProxyMapper $proxyMapper) {
52
+        parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
+            $proxyMapper, 'principals/calendar-rooms', 'room', 'ROOM');
54
+    }
55 55
 }
Please login to merge, or discard this patch.
apps/dav/lib/BackgroundJob/EventReminderJob.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -25,40 +25,40 @@
 block discarded – undo
25 25
 
26 26
 class EventReminderJob extends TimedJob {
27 27
 
28
-	/** @var ReminderService */
29
-	private $reminderService;
28
+    /** @var ReminderService */
29
+    private $reminderService;
30 30
 
31
-	/** @var IConfig */
32
-	private $config;
31
+    /** @var IConfig */
32
+    private $config;
33 33
 
34
-	/**
35
-	 * EventReminderJob constructor.
36
-	 *
37
-	 * @param ReminderService $reminderService
38
-	 * @param IConfig $config
39
-	 */
40
-	public function __construct(ReminderService $reminderService, IConfig $config) {
41
-		$this->reminderService = $reminderService;
42
-		$this->config = $config;
43
-		/** Run every 5 minutes */
44
-		$this->setInterval(5);
45
-	}
34
+    /**
35
+     * EventReminderJob constructor.
36
+     *
37
+     * @param ReminderService $reminderService
38
+     * @param IConfig $config
39
+     */
40
+    public function __construct(ReminderService $reminderService, IConfig $config) {
41
+        $this->reminderService = $reminderService;
42
+        $this->config = $config;
43
+        /** Run every 5 minutes */
44
+        $this->setInterval(5);
45
+    }
46 46
 
47
-	/**
48
-	 * @param $arg
49
-	 * @throws \OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException
50
-	 * @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException
51
-	 * @throws \OC\User\NoUserException
52
-	 */
53
-	public function run($arg):void {
54
-		if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') {
55
-			return;
56
-		}
47
+    /**
48
+     * @param $arg
49
+     * @throws \OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException
50
+     * @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException
51
+     * @throws \OC\User\NoUserException
52
+     */
53
+    public function run($arg):void {
54
+        if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') {
55
+            return;
56
+        }
57 57
 
58
-		if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') {
59
-			return;
60
-		}
58
+        if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') {
59
+            return;
60
+        }
61 61
 
62
-		$this->reminderService->processReminders();
63
-	}
62
+        $this->reminderService->processReminders();
63
+    }
64 64
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -31,51 +31,51 @@
 block discarded – undo
31 31
  */
32 32
 class NotificationProviderManager {
33 33
 
34
-	/** @var INotificationProvider[] */
35
-	private $providers = [];
34
+    /** @var INotificationProvider[] */
35
+    private $providers = [];
36 36
 
37
-	/**
38
-	 * Checks whether a provider for a given ACTION exists
39
-	 *
40
-	 * @param string $type
41
-	 * @return bool
42
-	 */
43
-	public function hasProvider(string $type):bool {
44
-		return (\in_array($type, ReminderService::REMINDER_TYPES, true)
45
-			&& isset($this->providers[$type]));
46
-	}
37
+    /**
38
+     * Checks whether a provider for a given ACTION exists
39
+     *
40
+     * @param string $type
41
+     * @return bool
42
+     */
43
+    public function hasProvider(string $type):bool {
44
+        return (\in_array($type, ReminderService::REMINDER_TYPES, true)
45
+            && isset($this->providers[$type]));
46
+    }
47 47
 
48
-	/**
49
-	 * Get provider for a given ACTION
50
-	 *
51
-	 * @param string $type
52
-	 * @return INotificationProvider
53
-	 * @throws NotificationProvider\ProviderNotAvailableException
54
-	 * @throws NotificationTypeDoesNotExistException
55
-	 */
56
-	public function getProvider(string $type):INotificationProvider {
57
-		if (in_array($type, ReminderService::REMINDER_TYPES, true)) {
58
-			if (isset($this->providers[$type])) {
59
-				return $this->providers[$type];
60
-			}
61
-			throw new NotificationProvider\ProviderNotAvailableException($type);
62
-		}
63
-		throw new NotificationTypeDoesNotExistException($type);
64
-	}
48
+    /**
49
+     * Get provider for a given ACTION
50
+     *
51
+     * @param string $type
52
+     * @return INotificationProvider
53
+     * @throws NotificationProvider\ProviderNotAvailableException
54
+     * @throws NotificationTypeDoesNotExistException
55
+     */
56
+    public function getProvider(string $type):INotificationProvider {
57
+        if (in_array($type, ReminderService::REMINDER_TYPES, true)) {
58
+            if (isset($this->providers[$type])) {
59
+                return $this->providers[$type];
60
+            }
61
+            throw new NotificationProvider\ProviderNotAvailableException($type);
62
+        }
63
+        throw new NotificationTypeDoesNotExistException($type);
64
+    }
65 65
 
66
-	/**
67
-	 * Registers a new provider
68
-	 *
69
-	 * @param string $providerClassName
70
-	 * @throws \OCP\AppFramework\QueryException
71
-	 */
72
-	public function registerProvider(string $providerClassName):void {
73
-		$provider = \OC::$server->query($providerClassName);
66
+    /**
67
+     * Registers a new provider
68
+     *
69
+     * @param string $providerClassName
70
+     * @throws \OCP\AppFramework\QueryException
71
+     */
72
+    public function registerProvider(string $providerClassName):void {
73
+        $provider = \OC::$server->query($providerClassName);
74 74
 
75
-		if (!$provider instanceof INotificationProvider) {
76
-			throw new \InvalidArgumentException('Invalid notification provider registered');
77
-		}
75
+        if (!$provider instanceof INotificationProvider) {
76
+            throw new \InvalidArgumentException('Invalid notification provider registered');
77
+        }
78 78
 
79
-		$this->providers[$provider::NOTIFICATION_TYPE] = $provider;
80
-	}
79
+        $this->providers[$provider::NOTIFICATION_TYPE] = $provider;
80
+    }
81 81
 }
Please login to merge, or discard this patch.