Passed
Push — master ( 28e255...7ed11b )
by Morris
24:23 queued 10:03
created
apps/dav/appinfo/v2/remote.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 // no php execution timeout for webdav
23 23
 if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
24
-	@set_time_limit(0);
24
+    @set_time_limit(0);
25 25
 }
26 26
 ignore_user_abort(true);
27 27
 
Please login to merge, or discard this patch.
lib/private/Share20/ProviderFactory.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		}
215 215
 
216 216
 		if ($provider === null) {
217
-			throw new ProviderException('No provider with id .' . $id . ' found.');
217
+			throw new ProviderException('No provider with id .'.$id.' found.');
218 218
 		}
219 219
 
220 220
 		return $provider;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
 
243 243
 		if ($provider === null) {
244
-			throw new ProviderException('No share provider for share type ' . $shareType);
244
+			throw new ProviderException('No share provider for share type '.$shareType);
245 245
 		}
246 246
 
247 247
 		return $provider;
Please login to merge, or discard this patch.
Indentation   +261 added lines, -261 removed lines patch added patch discarded remove patch
@@ -50,274 +50,274 @@
 block discarded – undo
50 50
  */
51 51
 class ProviderFactory implements IProviderFactory {
52 52
 
53
-	/** @var IServerContainer */
54
-	private $serverContainer;
55
-	/** @var DefaultShareProvider */
56
-	private $defaultProvider = null;
57
-	/** @var FederatedShareProvider */
58
-	private $federatedProvider = null;
59
-	/** @var  ShareByMailProvider */
60
-	private $shareByMailProvider;
61
-	/** @var  \OCA\Circles\ShareByCircleProvider */
62
-	private $shareByCircleProvider = null;
63
-	/** @var bool */
64
-	private $circlesAreNotAvailable = false;
65
-	/** @var \OCA\Talk\Share\RoomShareProvider */
66
-	private $roomShareProvider = null;
67
-
68
-	/**
69
-	 * IProviderFactory constructor.
70
-	 *
71
-	 * @param IServerContainer $serverContainer
72
-	 */
73
-	public function __construct(IServerContainer $serverContainer) {
74
-		$this->serverContainer = $serverContainer;
75
-	}
76
-
77
-	/**
78
-	 * Create the default share provider.
79
-	 *
80
-	 * @return DefaultShareProvider
81
-	 */
82
-	protected function defaultShareProvider() {
83
-		if ($this->defaultProvider === null) {
84
-			$this->defaultProvider = new DefaultShareProvider(
85
-				$this->serverContainer->getDatabaseConnection(),
86
-				$this->serverContainer->getUserManager(),
87
-				$this->serverContainer->getGroupManager(),
88
-				$this->serverContainer->getLazyRootFolder(),
89
-				$this->serverContainer->getMailer(),
90
-				$this->serverContainer->query(Defaults::class),
91
-				$this->serverContainer->getL10NFactory(),
92
-				$this->serverContainer->getURLGenerator(),
93
-				$this->serverContainer->getConfig()
94
-			);
95
-		}
96
-
97
-		return $this->defaultProvider;
98
-	}
99
-
100
-	/**
101
-	 * Create the federated share provider
102
-	 *
103
-	 * @return FederatedShareProvider
104
-	 */
105
-	protected function federatedShareProvider() {
106
-		if ($this->federatedProvider === null) {
107
-			/*
53
+    /** @var IServerContainer */
54
+    private $serverContainer;
55
+    /** @var DefaultShareProvider */
56
+    private $defaultProvider = null;
57
+    /** @var FederatedShareProvider */
58
+    private $federatedProvider = null;
59
+    /** @var  ShareByMailProvider */
60
+    private $shareByMailProvider;
61
+    /** @var  \OCA\Circles\ShareByCircleProvider */
62
+    private $shareByCircleProvider = null;
63
+    /** @var bool */
64
+    private $circlesAreNotAvailable = false;
65
+    /** @var \OCA\Talk\Share\RoomShareProvider */
66
+    private $roomShareProvider = null;
67
+
68
+    /**
69
+     * IProviderFactory constructor.
70
+     *
71
+     * @param IServerContainer $serverContainer
72
+     */
73
+    public function __construct(IServerContainer $serverContainer) {
74
+        $this->serverContainer = $serverContainer;
75
+    }
76
+
77
+    /**
78
+     * Create the default share provider.
79
+     *
80
+     * @return DefaultShareProvider
81
+     */
82
+    protected function defaultShareProvider() {
83
+        if ($this->defaultProvider === null) {
84
+            $this->defaultProvider = new DefaultShareProvider(
85
+                $this->serverContainer->getDatabaseConnection(),
86
+                $this->serverContainer->getUserManager(),
87
+                $this->serverContainer->getGroupManager(),
88
+                $this->serverContainer->getLazyRootFolder(),
89
+                $this->serverContainer->getMailer(),
90
+                $this->serverContainer->query(Defaults::class),
91
+                $this->serverContainer->getL10NFactory(),
92
+                $this->serverContainer->getURLGenerator(),
93
+                $this->serverContainer->getConfig()
94
+            );
95
+        }
96
+
97
+        return $this->defaultProvider;
98
+    }
99
+
100
+    /**
101
+     * Create the federated share provider
102
+     *
103
+     * @return FederatedShareProvider
104
+     */
105
+    protected function federatedShareProvider() {
106
+        if ($this->federatedProvider === null) {
107
+            /*
108 108
 			 * Check if the app is enabled
109 109
 			 */
110
-			$appManager = $this->serverContainer->getAppManager();
111
-			if (!$appManager->isEnabledForUser('federatedfilesharing')) {
112
-				return null;
113
-			}
110
+            $appManager = $this->serverContainer->getAppManager();
111
+            if (!$appManager->isEnabledForUser('federatedfilesharing')) {
112
+                return null;
113
+            }
114 114
 
115
-			/*
115
+            /*
116 116
 			 * TODO: add factory to federated sharing app
117 117
 			 */
118
-			$l = $this->serverContainer->getL10N('federatedfilesharing');
119
-			$addressHandler = new AddressHandler(
120
-				$this->serverContainer->getURLGenerator(),
121
-				$l,
122
-				$this->serverContainer->getCloudIdManager()
123
-			);
124
-			$notifications = new Notifications(
125
-				$addressHandler,
126
-				$this->serverContainer->getHTTPClientService(),
127
-				$this->serverContainer->query(\OCP\OCS\IDiscoveryService::class),
128
-				$this->serverContainer->getJobList(),
129
-				\OC::$server->getCloudFederationProviderManager(),
130
-				\OC::$server->getCloudFederationFactory(),
131
-				$this->serverContainer->query(IEventDispatcher::class)
132
-			);
133
-			$tokenHandler = new TokenHandler(
134
-				$this->serverContainer->getSecureRandom()
135
-			);
136
-
137
-			$this->federatedProvider = new FederatedShareProvider(
138
-				$this->serverContainer->getDatabaseConnection(),
139
-				$addressHandler,
140
-				$notifications,
141
-				$tokenHandler,
142
-				$l,
143
-				$this->serverContainer->getLogger(),
144
-				$this->serverContainer->getLazyRootFolder(),
145
-				$this->serverContainer->getConfig(),
146
-				$this->serverContainer->getUserManager(),
147
-				$this->serverContainer->getCloudIdManager(),
148
-				$this->serverContainer->getGlobalScaleConfig(),
149
-				$this->serverContainer->getCloudFederationProviderManager()
150
-			);
151
-		}
152
-
153
-		return $this->federatedProvider;
154
-	}
155
-
156
-	/**
157
-	 * Create the federated share provider
158
-	 *
159
-	 * @return ShareByMailProvider
160
-	 */
161
-	protected function getShareByMailProvider() {
162
-		if ($this->shareByMailProvider === null) {
163
-			/*
118
+            $l = $this->serverContainer->getL10N('federatedfilesharing');
119
+            $addressHandler = new AddressHandler(
120
+                $this->serverContainer->getURLGenerator(),
121
+                $l,
122
+                $this->serverContainer->getCloudIdManager()
123
+            );
124
+            $notifications = new Notifications(
125
+                $addressHandler,
126
+                $this->serverContainer->getHTTPClientService(),
127
+                $this->serverContainer->query(\OCP\OCS\IDiscoveryService::class),
128
+                $this->serverContainer->getJobList(),
129
+                \OC::$server->getCloudFederationProviderManager(),
130
+                \OC::$server->getCloudFederationFactory(),
131
+                $this->serverContainer->query(IEventDispatcher::class)
132
+            );
133
+            $tokenHandler = new TokenHandler(
134
+                $this->serverContainer->getSecureRandom()
135
+            );
136
+
137
+            $this->federatedProvider = new FederatedShareProvider(
138
+                $this->serverContainer->getDatabaseConnection(),
139
+                $addressHandler,
140
+                $notifications,
141
+                $tokenHandler,
142
+                $l,
143
+                $this->serverContainer->getLogger(),
144
+                $this->serverContainer->getLazyRootFolder(),
145
+                $this->serverContainer->getConfig(),
146
+                $this->serverContainer->getUserManager(),
147
+                $this->serverContainer->getCloudIdManager(),
148
+                $this->serverContainer->getGlobalScaleConfig(),
149
+                $this->serverContainer->getCloudFederationProviderManager()
150
+            );
151
+        }
152
+
153
+        return $this->federatedProvider;
154
+    }
155
+
156
+    /**
157
+     * Create the federated share provider
158
+     *
159
+     * @return ShareByMailProvider
160
+     */
161
+    protected function getShareByMailProvider() {
162
+        if ($this->shareByMailProvider === null) {
163
+            /*
164 164
 			 * Check if the app is enabled
165 165
 			 */
166
-			$appManager = $this->serverContainer->getAppManager();
167
-			if (!$appManager->isEnabledForUser('sharebymail')) {
168
-				return null;
169
-			}
170
-
171
-			$settingsManager = new SettingsManager($this->serverContainer->getConfig());
172
-
173
-			$this->shareByMailProvider = new ShareByMailProvider(
174
-				$this->serverContainer->getDatabaseConnection(),
175
-				$this->serverContainer->getSecureRandom(),
176
-				$this->serverContainer->getUserManager(),
177
-				$this->serverContainer->getLazyRootFolder(),
178
-				$this->serverContainer->getL10N('sharebymail'),
179
-				$this->serverContainer->getLogger(),
180
-				$this->serverContainer->getMailer(),
181
-				$this->serverContainer->getURLGenerator(),
182
-				$this->serverContainer->getActivityManager(),
183
-				$settingsManager,
184
-				$this->serverContainer->query(Defaults::class),
185
-				$this->serverContainer->getHasher(),
186
-				$this->serverContainer->get(IEventDispatcher::class)
187
-			);
188
-		}
189
-
190
-		return $this->shareByMailProvider;
191
-	}
192
-
193
-
194
-	/**
195
-	 * Create the circle share provider
196
-	 *
197
-	 * @return FederatedShareProvider
198
-	 *
199
-	 * @suppress PhanUndeclaredClassMethod
200
-	 */
201
-	protected function getShareByCircleProvider() {
202
-		if ($this->circlesAreNotAvailable) {
203
-			return null;
204
-		}
205
-
206
-		if (!$this->serverContainer->getAppManager()->isEnabledForUser('circles') ||
207
-			!class_exists('\OCA\Circles\ShareByCircleProvider')
208
-		) {
209
-			$this->circlesAreNotAvailable = true;
210
-			return null;
211
-		}
212
-
213
-		if ($this->shareByCircleProvider === null) {
214
-			$this->shareByCircleProvider = new \OCA\Circles\ShareByCircleProvider(
215
-				$this->serverContainer->getDatabaseConnection(),
216
-				$this->serverContainer->getSecureRandom(),
217
-				$this->serverContainer->getUserManager(),
218
-				$this->serverContainer->getLazyRootFolder(),
219
-				$this->serverContainer->getL10N('circles'),
220
-				$this->serverContainer->getLogger(),
221
-				$this->serverContainer->getURLGenerator()
222
-			);
223
-		}
224
-
225
-		return $this->shareByCircleProvider;
226
-	}
227
-
228
-	/**
229
-	 * Create the room share provider
230
-	 *
231
-	 * @return RoomShareProvider
232
-	 */
233
-	protected function getRoomShareProvider() {
234
-		if ($this->roomShareProvider === null) {
235
-			/*
166
+            $appManager = $this->serverContainer->getAppManager();
167
+            if (!$appManager->isEnabledForUser('sharebymail')) {
168
+                return null;
169
+            }
170
+
171
+            $settingsManager = new SettingsManager($this->serverContainer->getConfig());
172
+
173
+            $this->shareByMailProvider = new ShareByMailProvider(
174
+                $this->serverContainer->getDatabaseConnection(),
175
+                $this->serverContainer->getSecureRandom(),
176
+                $this->serverContainer->getUserManager(),
177
+                $this->serverContainer->getLazyRootFolder(),
178
+                $this->serverContainer->getL10N('sharebymail'),
179
+                $this->serverContainer->getLogger(),
180
+                $this->serverContainer->getMailer(),
181
+                $this->serverContainer->getURLGenerator(),
182
+                $this->serverContainer->getActivityManager(),
183
+                $settingsManager,
184
+                $this->serverContainer->query(Defaults::class),
185
+                $this->serverContainer->getHasher(),
186
+                $this->serverContainer->get(IEventDispatcher::class)
187
+            );
188
+        }
189
+
190
+        return $this->shareByMailProvider;
191
+    }
192
+
193
+
194
+    /**
195
+     * Create the circle share provider
196
+     *
197
+     * @return FederatedShareProvider
198
+     *
199
+     * @suppress PhanUndeclaredClassMethod
200
+     */
201
+    protected function getShareByCircleProvider() {
202
+        if ($this->circlesAreNotAvailable) {
203
+            return null;
204
+        }
205
+
206
+        if (!$this->serverContainer->getAppManager()->isEnabledForUser('circles') ||
207
+            !class_exists('\OCA\Circles\ShareByCircleProvider')
208
+        ) {
209
+            $this->circlesAreNotAvailable = true;
210
+            return null;
211
+        }
212
+
213
+        if ($this->shareByCircleProvider === null) {
214
+            $this->shareByCircleProvider = new \OCA\Circles\ShareByCircleProvider(
215
+                $this->serverContainer->getDatabaseConnection(),
216
+                $this->serverContainer->getSecureRandom(),
217
+                $this->serverContainer->getUserManager(),
218
+                $this->serverContainer->getLazyRootFolder(),
219
+                $this->serverContainer->getL10N('circles'),
220
+                $this->serverContainer->getLogger(),
221
+                $this->serverContainer->getURLGenerator()
222
+            );
223
+        }
224
+
225
+        return $this->shareByCircleProvider;
226
+    }
227
+
228
+    /**
229
+     * Create the room share provider
230
+     *
231
+     * @return RoomShareProvider
232
+     */
233
+    protected function getRoomShareProvider() {
234
+        if ($this->roomShareProvider === null) {
235
+            /*
236 236
 			 * Check if the app is enabled
237 237
 			 */
238
-			$appManager = $this->serverContainer->getAppManager();
239
-			if (!$appManager->isEnabledForUser('spreed')) {
240
-				return null;
241
-			}
242
-
243
-			try {
244
-				$this->roomShareProvider = $this->serverContainer->query('\OCA\Talk\Share\RoomShareProvider');
245
-			} catch (\OCP\AppFramework\QueryException $e) {
246
-				return null;
247
-			}
248
-		}
249
-
250
-		return $this->roomShareProvider;
251
-	}
252
-
253
-	/**
254
-	 * @inheritdoc
255
-	 */
256
-	public function getProvider($id) {
257
-		$provider = null;
258
-		if ($id === 'ocinternal') {
259
-			$provider = $this->defaultShareProvider();
260
-		} elseif ($id === 'ocFederatedSharing') {
261
-			$provider = $this->federatedShareProvider();
262
-		} elseif ($id === 'ocMailShare') {
263
-			$provider = $this->getShareByMailProvider();
264
-		} elseif ($id === 'ocCircleShare') {
265
-			$provider = $this->getShareByCircleProvider();
266
-		} elseif ($id === 'ocRoomShare') {
267
-			$provider = $this->getRoomShareProvider();
268
-		}
269
-
270
-		if ($provider === null) {
271
-			throw new ProviderException('No provider with id .' . $id . ' found.');
272
-		}
273
-
274
-		return $provider;
275
-	}
276
-
277
-	/**
278
-	 * @inheritdoc
279
-	 */
280
-	public function getProviderForType($shareType) {
281
-		$provider = null;
282
-
283
-		if ($shareType === IShare::TYPE_USER ||
284
-			$shareType === IShare::TYPE_GROUP ||
285
-			$shareType === IShare::TYPE_LINK
286
-		) {
287
-			$provider = $this->defaultShareProvider();
288
-		} elseif ($shareType === IShare::TYPE_REMOTE || $shareType === IShare::TYPE_REMOTE_GROUP) {
289
-			$provider = $this->federatedShareProvider();
290
-		} elseif ($shareType === IShare::TYPE_EMAIL) {
291
-			$provider = $this->getShareByMailProvider();
292
-		} elseif ($shareType === IShare::TYPE_CIRCLE) {
293
-			$provider = $this->getShareByCircleProvider();
294
-		} elseif ($shareType === IShare::TYPE_ROOM) {
295
-			$provider = $this->getRoomShareProvider();
296
-		}
297
-
298
-
299
-		if ($provider === null) {
300
-			throw new ProviderException('No share provider for share type ' . $shareType);
301
-		}
302
-
303
-		return $provider;
304
-	}
305
-
306
-	public function getAllProviders() {
307
-		$shares = [$this->defaultShareProvider(), $this->federatedShareProvider()];
308
-		$shareByMail = $this->getShareByMailProvider();
309
-		if ($shareByMail !== null) {
310
-			$shares[] = $shareByMail;
311
-		}
312
-		$shareByCircle = $this->getShareByCircleProvider();
313
-		if ($shareByCircle !== null) {
314
-			$shares[] = $shareByCircle;
315
-		}
316
-		$roomShare = $this->getRoomShareProvider();
317
-		if ($roomShare !== null) {
318
-			$shares[] = $roomShare;
319
-		}
320
-
321
-		return $shares;
322
-	}
238
+            $appManager = $this->serverContainer->getAppManager();
239
+            if (!$appManager->isEnabledForUser('spreed')) {
240
+                return null;
241
+            }
242
+
243
+            try {
244
+                $this->roomShareProvider = $this->serverContainer->query('\OCA\Talk\Share\RoomShareProvider');
245
+            } catch (\OCP\AppFramework\QueryException $e) {
246
+                return null;
247
+            }
248
+        }
249
+
250
+        return $this->roomShareProvider;
251
+    }
252
+
253
+    /**
254
+     * @inheritdoc
255
+     */
256
+    public function getProvider($id) {
257
+        $provider = null;
258
+        if ($id === 'ocinternal') {
259
+            $provider = $this->defaultShareProvider();
260
+        } elseif ($id === 'ocFederatedSharing') {
261
+            $provider = $this->federatedShareProvider();
262
+        } elseif ($id === 'ocMailShare') {
263
+            $provider = $this->getShareByMailProvider();
264
+        } elseif ($id === 'ocCircleShare') {
265
+            $provider = $this->getShareByCircleProvider();
266
+        } elseif ($id === 'ocRoomShare') {
267
+            $provider = $this->getRoomShareProvider();
268
+        }
269
+
270
+        if ($provider === null) {
271
+            throw new ProviderException('No provider with id .' . $id . ' found.');
272
+        }
273
+
274
+        return $provider;
275
+    }
276
+
277
+    /**
278
+     * @inheritdoc
279
+     */
280
+    public function getProviderForType($shareType) {
281
+        $provider = null;
282
+
283
+        if ($shareType === IShare::TYPE_USER ||
284
+            $shareType === IShare::TYPE_GROUP ||
285
+            $shareType === IShare::TYPE_LINK
286
+        ) {
287
+            $provider = $this->defaultShareProvider();
288
+        } elseif ($shareType === IShare::TYPE_REMOTE || $shareType === IShare::TYPE_REMOTE_GROUP) {
289
+            $provider = $this->federatedShareProvider();
290
+        } elseif ($shareType === IShare::TYPE_EMAIL) {
291
+            $provider = $this->getShareByMailProvider();
292
+        } elseif ($shareType === IShare::TYPE_CIRCLE) {
293
+            $provider = $this->getShareByCircleProvider();
294
+        } elseif ($shareType === IShare::TYPE_ROOM) {
295
+            $provider = $this->getRoomShareProvider();
296
+        }
297
+
298
+
299
+        if ($provider === null) {
300
+            throw new ProviderException('No share provider for share type ' . $shareType);
301
+        }
302
+
303
+        return $provider;
304
+    }
305
+
306
+    public function getAllProviders() {
307
+        $shares = [$this->defaultShareProvider(), $this->federatedShareProvider()];
308
+        $shareByMail = $this->getShareByMailProvider();
309
+        if ($shareByMail !== null) {
310
+            $shares[] = $shareByMail;
311
+        }
312
+        $shareByCircle = $this->getShareByCircleProvider();
313
+        if ($shareByCircle !== null) {
314
+            $shares[] = $shareByCircle;
315
+        }
316
+        $roomShare = $this->getRoomShareProvider();
317
+        if ($roomShare !== null) {
318
+            $shares[] = $roomShare;
319
+        }
320
+
321
+        return $shares;
322
+    }
323 323
 }
Please login to merge, or discard this patch.
lib/private/Migration/ConsoleOutput.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -37,57 +37,57 @@
 block discarded – undo
37 37
  */
38 38
 class ConsoleOutput implements IOutput {
39 39
 
40
-	/** @var OutputInterface */
41
-	private $output;
40
+    /** @var OutputInterface */
41
+    private $output;
42 42
 
43
-	/** @var ProgressBar */
44
-	private $progressBar;
43
+    /** @var ProgressBar */
44
+    private $progressBar;
45 45
 
46
-	public function __construct(OutputInterface $output) {
47
-		$this->output = $output;
48
-	}
46
+    public function __construct(OutputInterface $output) {
47
+        $this->output = $output;
48
+    }
49 49
 
50
-	/**
51
-	 * @param string $message
52
-	 */
53
-	public function info($message) {
54
-		$this->output->writeln("<info>$message</info>");
55
-	}
50
+    /**
51
+     * @param string $message
52
+     */
53
+    public function info($message) {
54
+        $this->output->writeln("<info>$message</info>");
55
+    }
56 56
 
57
-	/**
58
-	 * @param string $message
59
-	 */
60
-	public function warning($message) {
61
-		$this->output->writeln("<comment>$message</comment>");
62
-	}
57
+    /**
58
+     * @param string $message
59
+     */
60
+    public function warning($message) {
61
+        $this->output->writeln("<comment>$message</comment>");
62
+    }
63 63
 
64
-	/**
65
-	 * @param int $max
66
-	 */
67
-	public function startProgress($max = 0) {
68
-		if (!is_null($this->progressBar)) {
69
-			$this->progressBar->finish();
70
-		}
71
-		$this->progressBar = new ProgressBar($this->output);
72
-		$this->progressBar->start($max);
73
-	}
64
+    /**
65
+     * @param int $max
66
+     */
67
+    public function startProgress($max = 0) {
68
+        if (!is_null($this->progressBar)) {
69
+            $this->progressBar->finish();
70
+        }
71
+        $this->progressBar = new ProgressBar($this->output);
72
+        $this->progressBar->start($max);
73
+    }
74 74
 
75
-	/**
76
-	 * @param int $step
77
-	 * @param string $description
78
-	 */
79
-	public function advance($step = 1, $description = '') {
80
-		if (!is_null($this->progressBar)) {
81
-			$this->progressBar = new ProgressBar($this->output);
82
-			$this->progressBar->start();
83
-		}
84
-		$this->progressBar->advance($step);
85
-	}
75
+    /**
76
+     * @param int $step
77
+     * @param string $description
78
+     */
79
+    public function advance($step = 1, $description = '') {
80
+        if (!is_null($this->progressBar)) {
81
+            $this->progressBar = new ProgressBar($this->output);
82
+            $this->progressBar->start();
83
+        }
84
+        $this->progressBar->advance($step);
85
+    }
86 86
 
87
-	public function finishProgress() {
88
-		if (is_null($this->progressBar)) {
89
-			return;
90
-		}
91
-		$this->progressBar->finish();
92
-	}
87
+    public function finishProgress() {
88
+        if (is_null($this->progressBar)) {
89
+            return;
90
+        }
91
+        $this->progressBar->finish();
92
+    }
93 93
 }
Please login to merge, or discard this patch.
lib/public/Contacts/ContactsMenu/IEntry.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -31,36 +31,36 @@
 block discarded – undo
31 31
  */
32 32
 interface IEntry extends JsonSerializable {
33 33
 
34
-	/**
35
-	 * @since 12.0
36
-	 * @return string
37
-	 */
38
-	public function getFullName();
34
+    /**
35
+     * @since 12.0
36
+     * @return string
37
+     */
38
+    public function getFullName();
39 39
 
40
-	/**
41
-	 * @since 12.0
42
-	 * @return string[]
43
-	 */
44
-	public function getEMailAddresses();
40
+    /**
41
+     * @since 12.0
42
+     * @return string[]
43
+     */
44
+    public function getEMailAddresses();
45 45
 
46
-	/**
47
-	 * @since 12.0
48
-	 * @return string|null image URI
49
-	 */
50
-	public function getAvatar();
46
+    /**
47
+     * @since 12.0
48
+     * @return string|null image URI
49
+     */
50
+    public function getAvatar();
51 51
 
52
-	/**
53
-	 * @since 12.0
54
-	 * @param IAction $action an action to show in the contacts menu
55
-	 */
56
-	public function addAction(IAction $action);
52
+    /**
53
+     * @since 12.0
54
+     * @param IAction $action an action to show in the contacts menu
55
+     */
56
+    public function addAction(IAction $action);
57 57
 
58
-	/**
59
-	 * Get an arbitrary property from the contact
60
-	 *
61
-	 * @since 12.0
62
-	 * @param string $key
63
-	 * @return mixed the value of the property or null
64
-	 */
65
-	public function getProperty($key);
58
+    /**
59
+     * Get an arbitrary property from the contact
60
+     *
61
+     * @since 12.0
62
+     * @param string $key
63
+     * @return mixed the value of the property or null
64
+     */
65
+    public function getProperty($key);
66 66
 }
Please login to merge, or discard this patch.
apps/dav/lib/Avatars/RootCollection.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
7 7
 
8 8
 class RootCollection extends AbstractPrincipalCollection {
9 9
 
10
-	/**
11
-	 * This method returns a node for a principal.
12
-	 *
13
-	 * The passed array contains principal information, and is guaranteed to
14
-	 * at least contain a uri item. Other properties may or may not be
15
-	 * supplied by the authentication backend.
16
-	 *
17
-	 * @param array $principalInfo
18
-	 * @return AvatarHome
19
-	 */
20
-	public function getChildForPrincipal(array $principalInfo) {
21
-		$avatarManager = \OC::$server->getAvatarManager();
22
-		return new AvatarHome($principalInfo, $avatarManager);
23
-	}
10
+    /**
11
+     * This method returns a node for a principal.
12
+     *
13
+     * The passed array contains principal information, and is guaranteed to
14
+     * at least contain a uri item. Other properties may or may not be
15
+     * supplied by the authentication backend.
16
+     *
17
+     * @param array $principalInfo
18
+     * @return AvatarHome
19
+     */
20
+    public function getChildForPrincipal(array $principalInfo) {
21
+        $avatarManager = \OC::$server->getAvatarManager();
22
+        return new AvatarHome($principalInfo, $avatarManager);
23
+    }
24 24
 
25
-	public function getName() {
26
-		return 'avatars';
27
-	}
25
+    public function getName() {
26
+        return 'avatars';
27
+    }
28 28
 
29 29
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php 2 patches
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -33,87 +33,87 @@
 block discarded – undo
33 33
 
34 34
 class CalDAVRemoveEmptyValue implements IRepairStep {
35 35
 
36
-	/** @var IDBConnection */
37
-	private $db;
38
-
39
-	/** @var CalDavBackend */
40
-	private $calDavBackend;
41
-
42
-	/** @var ILogger */
43
-	private $logger;
44
-
45
-	/**
46
-	 * @param IDBConnection $db
47
-	 * @param CalDavBackend $calDavBackend
48
-	 * @param ILogger $logger
49
-	 */
50
-	public function __construct(IDBConnection $db, CalDavBackend $calDavBackend, ILogger $logger) {
51
-		$this->db = $db;
52
-		$this->calDavBackend = $calDavBackend;
53
-		$this->logger = $logger;
54
-	}
55
-
56
-	public function getName() {
57
-		return 'Fix broken values of calendar objects';
58
-	}
59
-
60
-	public function run(IOutput $output) {
61
-		$pattern = ';VALUE=:';
62
-		$count = $warnings = 0;
63
-
64
-		$objects = $this->getInvalidObjects($pattern);
65
-
66
-		$output->startProgress(count($objects));
67
-		foreach ($objects as $row) {
68
-			$calObject = $this->calDavBackend->getCalendarObject((int)$row['calendarid'], $row['uri']);
69
-			$data = preg_replace('/' . $pattern . '/', ':', $calObject['calendardata']);
70
-
71
-			if ($data !== $calObject['calendardata']) {
72
-				$output->advance();
73
-
74
-				try {
75
-					$this->calDavBackend->getDenormalizedData($data);
76
-				} catch (InvalidDataException $e) {
77
-					$this->logger->info('Calendar object for calendar {cal} with uri {uri} still invalid', [
78
-						'app' => 'dav',
79
-						'cal' => (int)$row['calendarid'],
80
-						'uri' => $row['uri'],
81
-					]);
82
-					$warnings++;
83
-					continue;
84
-				}
85
-
86
-				$this->calDavBackend->updateCalendarObject((int)$row['calendarid'], $row['uri'], $data);
87
-				$count++;
88
-			}
89
-		}
90
-		$output->finishProgress();
91
-
92
-		if ($warnings > 0) {
93
-			$output->warning(sprintf('%d events could not be updated, see log file for more information', $warnings));
94
-		}
95
-		if ($count > 0) {
96
-			$output->info(sprintf('Updated %d events', $count));
97
-		}
98
-	}
99
-
100
-	protected function getInvalidObjects($pattern) {
101
-		$query = $this->db->getQueryBuilder();
102
-		$query->select(['calendarid', 'uri'])
103
-			->from('calendarobjects')
104
-			->where($query->expr()->like(
105
-				'calendardata',
106
-				$query->createNamedParameter(
107
-					'%' . $this->db->escapeLikeParameter($pattern) . '%',
108
-					IQueryBuilder::PARAM_STR
109
-				),
110
-				IQueryBuilder::PARAM_STR
111
-			));
112
-
113
-		$result = $query->execute();
114
-		$rows = $result->fetchAll();
115
-		$result->closeCursor();
116
-
117
-		return $rows;
118
-	}
36
+    /** @var IDBConnection */
37
+    private $db;
38
+
39
+    /** @var CalDavBackend */
40
+    private $calDavBackend;
41
+
42
+    /** @var ILogger */
43
+    private $logger;
44
+
45
+    /**
46
+     * @param IDBConnection $db
47
+     * @param CalDavBackend $calDavBackend
48
+     * @param ILogger $logger
49
+     */
50
+    public function __construct(IDBConnection $db, CalDavBackend $calDavBackend, ILogger $logger) {
51
+        $this->db = $db;
52
+        $this->calDavBackend = $calDavBackend;
53
+        $this->logger = $logger;
54
+    }
55
+
56
+    public function getName() {
57
+        return 'Fix broken values of calendar objects';
58
+    }
59
+
60
+    public function run(IOutput $output) {
61
+        $pattern = ';VALUE=:';
62
+        $count = $warnings = 0;
63
+
64
+        $objects = $this->getInvalidObjects($pattern);
65
+
66
+        $output->startProgress(count($objects));
67
+        foreach ($objects as $row) {
68
+            $calObject = $this->calDavBackend->getCalendarObject((int)$row['calendarid'], $row['uri']);
69
+            $data = preg_replace('/' . $pattern . '/', ':', $calObject['calendardata']);
70
+
71
+            if ($data !== $calObject['calendardata']) {
72
+                $output->advance();
73
+
74
+                try {
75
+                    $this->calDavBackend->getDenormalizedData($data);
76
+                } catch (InvalidDataException $e) {
77
+                    $this->logger->info('Calendar object for calendar {cal} with uri {uri} still invalid', [
78
+                        'app' => 'dav',
79
+                        'cal' => (int)$row['calendarid'],
80
+                        'uri' => $row['uri'],
81
+                    ]);
82
+                    $warnings++;
83
+                    continue;
84
+                }
85
+
86
+                $this->calDavBackend->updateCalendarObject((int)$row['calendarid'], $row['uri'], $data);
87
+                $count++;
88
+            }
89
+        }
90
+        $output->finishProgress();
91
+
92
+        if ($warnings > 0) {
93
+            $output->warning(sprintf('%d events could not be updated, see log file for more information', $warnings));
94
+        }
95
+        if ($count > 0) {
96
+            $output->info(sprintf('Updated %d events', $count));
97
+        }
98
+    }
99
+
100
+    protected function getInvalidObjects($pattern) {
101
+        $query = $this->db->getQueryBuilder();
102
+        $query->select(['calendarid', 'uri'])
103
+            ->from('calendarobjects')
104
+            ->where($query->expr()->like(
105
+                'calendardata',
106
+                $query->createNamedParameter(
107
+                    '%' . $this->db->escapeLikeParameter($pattern) . '%',
108
+                    IQueryBuilder::PARAM_STR
109
+                ),
110
+                IQueryBuilder::PARAM_STR
111
+            ));
112
+
113
+        $result = $query->execute();
114
+        $rows = $result->fetchAll();
115
+        $result->closeCursor();
116
+
117
+        return $rows;
118
+    }
119 119
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$output->startProgress(count($objects));
67 67
 		foreach ($objects as $row) {
68
-			$calObject = $this->calDavBackend->getCalendarObject((int)$row['calendarid'], $row['uri']);
69
-			$data = preg_replace('/' . $pattern . '/', ':', $calObject['calendardata']);
68
+			$calObject = $this->calDavBackend->getCalendarObject((int) $row['calendarid'], $row['uri']);
69
+			$data = preg_replace('/'.$pattern.'/', ':', $calObject['calendardata']);
70 70
 
71 71
 			if ($data !== $calObject['calendardata']) {
72 72
 				$output->advance();
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
 				} catch (InvalidDataException $e) {
77 77
 					$this->logger->info('Calendar object for calendar {cal} with uri {uri} still invalid', [
78 78
 						'app' => 'dav',
79
-						'cal' => (int)$row['calendarid'],
79
+						'cal' => (int) $row['calendarid'],
80 80
 						'uri' => $row['uri'],
81 81
 					]);
82 82
 					$warnings++;
83 83
 					continue;
84 84
 				}
85 85
 
86
-				$this->calDavBackend->updateCalendarObject((int)$row['calendarid'], $row['uri'], $data);
86
+				$this->calDavBackend->updateCalendarObject((int) $row['calendarid'], $row['uri'], $data);
87 87
 				$count++;
88 88
 			}
89 89
 		}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			->where($query->expr()->like(
105 105
 				'calendardata',
106 106
 				$query->createNamedParameter(
107
-					'%' . $this->db->escapeLikeParameter($pattern) . '%',
107
+					'%'.$this->db->escapeLikeParameter($pattern).'%',
108 108
 					IQueryBuilder::PARAM_STR
109 109
 				),
110 110
 				IQueryBuilder::PARAM_STR
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 		$reader->parseInnerTree();
40 40
 
41 41
 		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
42
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}comp-filter requires a valid name attribute');
43 43
 		}
44 44
 
45 45
 		return $componentName;
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@
 block discarded – undo
27 27
 
28 28
 class CompFilter implements XmlDeserializable {
29 29
 
30
-	/**
31
-	 * @param Reader $reader
32
-	 * @throws BadRequest
33
-	 * @return string
34
-	 */
35
-	public static function xmlDeserialize(Reader $reader) {
36
-		$att = $reader->parseAttributes();
37
-		$componentName = $att['name'];
30
+    /**
31
+     * @param Reader $reader
32
+     * @throws BadRequest
33
+     * @return string
34
+     */
35
+    public static function xmlDeserialize(Reader $reader) {
36
+        $att = $reader->parseAttributes();
37
+        $componentName = $att['name'];
38 38
 
39
-		$reader->parseInnerTree();
39
+        $reader->parseInnerTree();
40 40
 
41
-		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
43
-		}
41
+        if (!is_string($componentName)) {
42
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute');
43
+        }
44 44
 
45
-		return $componentName;
46
-	}
45
+        return $componentName;
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 		$reader->parseInnerTree();
40 40
 
41 41
 		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute');
42
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}prop-filter requires a valid name attribute');
43 43
 		}
44 44
 
45 45
 		return $componentName;
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@
 block discarded – undo
27 27
 
28 28
 class PropFilter implements XmlDeserializable {
29 29
 
30
-	/**
31
-	 * @param Reader $reader
32
-	 * @throws BadRequest
33
-	 * @return string
34
-	 */
35
-	public static function xmlDeserialize(Reader $reader) {
36
-		$att = $reader->parseAttributes();
37
-		$componentName = $att['name'];
30
+    /**
31
+     * @param Reader $reader
32
+     * @throws BadRequest
33
+     * @return string
34
+     */
35
+    public static function xmlDeserialize(Reader $reader) {
36
+        $att = $reader->parseAttributes();
37
+        $componentName = $att['name'];
38 38
 
39
-		$reader->parseInnerTree();
39
+        $reader->parseInnerTree();
40 40
 
41
-		if (!is_string($componentName)) {
42
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute');
43
-		}
41
+        if (!is_string($componentName)) {
42
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute');
43
+        }
44 44
 
45
-		return $componentName;
46
-	}
45
+        return $componentName;
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
 		$reader->parseInnerTree();
41 41
 
42 42
 		if (!is_string($property)) {
43
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute');
43
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid property attribute');
44 44
 
45 45
 		}
46 46
 		if (!is_string($parameter)) {
47
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute');
47
+			throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid parameter attribute');
48 48
 		}
49 49
 
50 50
 		return [
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -27,28 +27,28 @@
 block discarded – undo
27 27
 
28 28
 class ParamFilter implements XmlDeserializable {
29 29
 
30
-	/**
31
-	 * @param Reader $reader
32
-	 * @throws BadRequest
33
-	 * @return string
34
-	 */
35
-	public static function xmlDeserialize(Reader $reader) {
36
-		$att = $reader->parseAttributes();
37
-		$property = $att['property'];
38
-		$parameter = $att['name'];
30
+    /**
31
+     * @param Reader $reader
32
+     * @throws BadRequest
33
+     * @return string
34
+     */
35
+    public static function xmlDeserialize(Reader $reader) {
36
+        $att = $reader->parseAttributes();
37
+        $property = $att['property'];
38
+        $parameter = $att['name'];
39 39
 
40
-		$reader->parseInnerTree();
40
+        $reader->parseInnerTree();
41 41
 
42
-		if (!is_string($property)) {
43
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute');
44
-		}
45
-		if (!is_string($parameter)) {
46
-			throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute');
47
-		}
42
+        if (!is_string($property)) {
43
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute');
44
+        }
45
+        if (!is_string($parameter)) {
46
+            throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute');
47
+        }
48 48
 
49
-		return [
50
-			'property' => $property,
51
-			'parameter' => $parameter,
52
-		];
53
-	}
49
+        return [
50
+            'property' => $property,
51
+            'parameter' => $parameter,
52
+        ];
53
+    }
54 54
 }
Please login to merge, or discard this patch.