Completed
Pull Request — master (#6724)
by Maxence
13:57
created
apps/dav/lib/Connector/Sabre/DavAclPlugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 
51 51
 	function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) {
52 52
 		$access = parent::checkPrivileges($uri, $privileges, $recursion, false);
53
-		if($access === false && $throwExceptions) {
53
+		if ($access === false && $throwExceptions) {
54 54
 			/** @var INode $node */
55 55
 			$node = $this->server->tree->getNodeForPath($uri);
56 56
 
57
-			switch(get_class($node)) {
57
+			switch (get_class($node)) {
58 58
 				case 'OCA\DAV\CardDAV\AddressBook':
59 59
 					$type = 'Addressbook';
60 60
 					break;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	public function propFind(PropFind $propFind, INode $node) {
78 78
 		// If the node is neither readable nor writable then fail unless its of
79 79
 		// the standard user-principal
80
-		if(!($node instanceof User)) {
80
+		if (!($node instanceof User)) {
81 81
 			$path = $propFind->getPath();
82 82
 			$readPermissions = $this->checkPrivileges($path, '{DAV:}read', self::R_PARENT, false);
83 83
 			$writePermissions = $this->checkPrivileges($path, '{DAV:}write', self::R_PARENT, false);
Please login to merge, or discard this patch.
apps/dav/lib/Connector/LegacyDAVACL.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@
 block discarded – undo
60 60
 
61 61
 	public function propFind(PropFind $propFind, INode $node) {
62 62
 		/* Overload current-user-principal */
63
-		$propFind->handle('{DAV:}current-user-principal', function () {
63
+		$propFind->handle('{DAV:}current-user-principal', function() {
64 64
 			if ($url = parent::getCurrentUserPrincipal()) {
65
-				return new Principal(Principal::HREF, $url . '/');
65
+				return new Principal(Principal::HREF, $url.'/');
66 66
 			} else {
67 67
 				return new Principal(Principal::UNAUTHENTICATED);
68 68
 			}
Please login to merge, or discard this patch.
apps/dav/lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 		$dispatcher = $this->getContainer()->getServer()->getEventDispatcher();
71 71
 
72 72
 		// first time login event setup
73
-		$dispatcher->addListener(IUser::class . '::firstLogin', function ($event) use ($hm) {
73
+		$dispatcher->addListener(IUser::class.'::firstLogin', function($event) use ($hm) {
74 74
 			if ($event instanceof GenericEvent) {
75 75
 				$hm->firstLogin($event->getSubject());
76 76
 			}
Please login to merge, or discard this patch.
apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 		$server->on('beforeMethod', [$this, 'beforeMethod']);
56 56
 	}
57 57
 
58
-	public function beforeMethod(RequestInterface $request, ResponseInterface $response){
58
+	public function beforeMethod(RequestInterface $request, ResponseInterface $response) {
59 59
 		// verify that the owner didn't have his share permissions revoked
60 60
 		if ($this->fileInfo && !$this->fileInfo->isShareable()) {
61 61
 			throw new NotFound();
Please login to merge, or discard this patch.
apps/dav/lib/Files/Sharing/FilesDropPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$this->enabled = false;
65 65
 	}
66 66
 
67
-	public function beforeMethod(RequestInterface $request, ResponseInterface $response){
67
+	public function beforeMethod(RequestInterface $request, ResponseInterface $response) {
68 68
 
69 69
 		if (!$this->enabled) {
70 70
 			return;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		$path = array_pop($path);
79 79
 
80 80
 		$newName = \OC_Helper::buildNotExistingFileNameForView('/', $path, $this->view);
81
-		$url = $request->getBaseUrl() . $newName;
81
+		$url = $request->getBaseUrl().$newName;
82 82
 		$request->setUrl($url);
83 83
 	}
84 84
 }
Please login to merge, or discard this patch.
apps/dav/lib/Upload/UploadFolder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	}
41 41
 
42 42
 	function createDirectory($name) {
43
-		throw new Forbidden('Permission denied to create file (filename ' . $name . ')');
43
+		throw new Forbidden('Permission denied to create file (filename '.$name.')');
44 44
 	}
45 45
 
46 46
 	function getChild($name) {
Please login to merge, or discard this patch.
apps/dav/lib/Upload/UploadHome.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	}
40 40
 
41 41
 	function createFile($name, $data = null) {
42
-		throw new Forbidden('Permission denied to create file (filename ' . $name . ')');
42
+		throw new Forbidden('Permission denied to create file (filename '.$name.')');
43 43
 	}
44 44
 
45 45
 	function createDirectory($name) {
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 		$rootView = new View();
84 84
 		$user = \OC::$server->getUserSession()->getUser();
85 85
 		Filesystem::initMountPoints($user->getUID());
86
-		if (!$rootView->file_exists('/' . $user->getUID() . '/uploads')) {
87
-			$rootView->mkdir('/' . $user->getUID() . '/uploads');
86
+		if (!$rootView->file_exists('/'.$user->getUID().'/uploads')) {
87
+			$rootView->mkdir('/'.$user->getUID().'/uploads');
88 88
 		}
89
-		$view = new View('/' . $user->getUID() . '/uploads');
89
+		$view = new View('/'.$user->getUID().'/uploads');
90 90
 		$rootInfo = $view->getFileInfo('');
91 91
 		$impl = new Directory($view, $rootInfo);
92 92
 		return $impl;
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Activity/Provider/Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	protected function setSubjects(IEvent $event, $subject, array $parameters) {
50 50
 		$placeholders = $replacements = [];
51 51
 		foreach ($parameters as $placeholder => $parameter) {
52
-			$placeholders[] = '{' . $placeholder . '}';
52
+			$placeholders[] = '{'.$placeholder.'}';
53 53
 			$replacements[] = $parameter['name'];
54 54
 		}
55 55
 
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Activity/Backend.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		foreach ($users as $user) {
134 134
 			$event->setAffectedUser($user)
135 135
 				->setSubject(
136
-					$user === $currentUser ? $action . '_self' : $action,
136
+					$user === $currentUser ? $action.'_self' : $action,
137 137
 					[
138 138
 						$currentUser,
139 139
 						$calendarData['{DAV:}displayname'],
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 					$event,
183 183
 					$calendarData,
184 184
 					Calendar::SUBJECT_UNSHARE_USER,
185
-					Calendar::SUBJECT_DELETE . '_self'
185
+					Calendar::SUBJECT_DELETE.'_self'
186 186
 				);
187 187
 
188 188
 				if ($owner !== $principal[2]) {
@@ -192,15 +192,15 @@  discard block
 block discarded – undo
192 192
 					];
193 193
 
194 194
 					if ($owner === $event->getAuthor()) {
195
-						$subject = Calendar::SUBJECT_UNSHARE_USER . '_you';
195
+						$subject = Calendar::SUBJECT_UNSHARE_USER.'_you';
196 196
 					} else if ($principal[2] === $event->getAuthor()) {
197
-						$subject = Calendar::SUBJECT_UNSHARE_USER . '_self';
197
+						$subject = Calendar::SUBJECT_UNSHARE_USER.'_self';
198 198
 					} else {
199 199
 						$event->setAffectedUser($event->getAuthor())
200
-							->setSubject(Calendar::SUBJECT_UNSHARE_USER . '_you', $parameters);
200
+							->setSubject(Calendar::SUBJECT_UNSHARE_USER.'_you', $parameters);
201 201
 						$this->activityManager->publish($event);
202 202
 
203
-						$subject = Calendar::SUBJECT_UNSHARE_USER . '_by';
203
+						$subject = Calendar::SUBJECT_UNSHARE_USER.'_by';
204 204
 						$parameters[] = $event->getAuthor();
205 205
 					}
206 206
 
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
 				];
218 218
 
219 219
 				if ($owner === $event->getAuthor()) {
220
-					$subject = Calendar::SUBJECT_UNSHARE_GROUP . '_you';
220
+					$subject = Calendar::SUBJECT_UNSHARE_GROUP.'_you';
221 221
 				} else {
222 222
 					$event->setAffectedUser($event->getAuthor())
223
-						->setSubject(Calendar::SUBJECT_UNSHARE_GROUP . '_you', $parameters);
223
+						->setSubject(Calendar::SUBJECT_UNSHARE_GROUP.'_you', $parameters);
224 224
 					$this->activityManager->publish($event);
225 225
 
226
-					$subject = Calendar::SUBJECT_UNSHARE_GROUP . '_by';
226
+					$subject = Calendar::SUBJECT_UNSHARE_GROUP.'_by';
227 227
 					$parameters[] = $event->getAuthor();
228 228
 				}
229 229
 
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
 					];
256 256
 
257 257
 					if ($owner === $event->getAuthor()) {
258
-						$subject = Calendar::SUBJECT_SHARE_USER . '_you';
258
+						$subject = Calendar::SUBJECT_SHARE_USER.'_you';
259 259
 					} else {
260 260
 						$event->setAffectedUser($event->getAuthor())
261
-							->setSubject(Calendar::SUBJECT_SHARE_USER . '_you', $parameters);
261
+							->setSubject(Calendar::SUBJECT_SHARE_USER.'_you', $parameters);
262 262
 						$this->activityManager->publish($event);
263 263
 
264
-						$subject = Calendar::SUBJECT_SHARE_USER . '_by';
264
+						$subject = Calendar::SUBJECT_SHARE_USER.'_by';
265 265
 						$parameters[] = $event->getAuthor();
266 266
 					}
267 267
 
@@ -278,13 +278,13 @@  discard block
 block discarded – undo
278 278
 				];
279 279
 
280 280
 				if ($owner === $event->getAuthor()) {
281
-					$subject = Calendar::SUBJECT_SHARE_GROUP . '_you';
281
+					$subject = Calendar::SUBJECT_SHARE_GROUP.'_you';
282 282
 				} else {
283 283
 					$event->setAffectedUser($event->getAuthor())
284
-						->setSubject(Calendar::SUBJECT_SHARE_GROUP . '_you', $parameters);
284
+						->setSubject(Calendar::SUBJECT_SHARE_GROUP.'_you', $parameters);
285 285
 					$this->activityManager->publish($event);
286 286
 
287
-					$subject = Calendar::SUBJECT_SHARE_GROUP . '_by';
287
+					$subject = Calendar::SUBJECT_SHARE_GROUP.'_by';
288 288
 					$parameters[] = $event->getAuthor();
289 289
 				}
290 290
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 		}
380 380
 
381 381
 		$object = $this->getObjectNameAndType($objectData);
382
-		$action = $action . '_' . $object['type'];
382
+		$action = $action.'_'.$object['type'];
383 383
 
384 384
 		if ($object['type'] === 'todo' && strpos($action, Event::SUBJECT_OBJECT_UPDATE) === 0 && $object['status'] === 'COMPLETED') {
385 385
 			$action .= '_completed';
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 		foreach ($users as $user) {
400 400
 			$event->setAffectedUser($user)
401 401
 				->setSubject(
402
-					$user === $currentUser ? $action . '_self' : $action,
402
+					$user === $currentUser ? $action.'_self' : $action,
403 403
 					[
404 404
 						$currentUser,
405 405
 						$calendarData['{DAV:}displayname'],
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 	protected function getObjectNameAndType(array $objectData) {
421 421
 		$vObject = Reader::read($objectData['calendardata']);
422 422
 		$component = $componentType = null;
423
-		foreach($vObject->getComponents() as $component) {
423
+		foreach ($vObject->getComponents() as $component) {
424 424
 			if (in_array($component->name, ['VEVENT', 'VTODO'])) {
425 425
 				$componentType = $component->name;
426 426
 				break;
Please login to merge, or discard this patch.