Completed
Pull Request — master (#3643)
by Christoph
12:28
created
apps/dav/lib/Connector/Sabre/FilesPlugin.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$this->server->on('propPatch', array($this, 'handleUpdateProperties'));
172 172
 		$this->server->on('afterBind', array($this, 'sendFileIdHeader'));
173 173
 		$this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
174
-		$this->server->on('afterMethod:GET', [$this,'httpGet']);
174
+		$this->server->on('afterMethod:GET', [$this, 'httpGet']);
175 175
 		$this->server->on('afterMethod:GET', array($this, 'handleDownloadToken'));
176 176
 		$this->server->on('afterResponse', function($request, ResponseInterface $response) {
177 177
 			$body = $response->getBody();
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
 		if ($sourceDir !== $destinationDir) {
202 202
 			$sourceNodeFileInfo = $sourceNode->getFileInfo();
203 203
 			if (is_null($sourceNodeFileInfo)) {
204
-				throw new NotFound($source . ' does not exist');
204
+				throw new NotFound($source.' does not exist');
205 205
 			}
206 206
 
207 207
 			if (!$sourceNodeFileInfo->isDeletable()) {
208
-				throw new Forbidden($source . " cannot be deleted");
208
+				throw new Forbidden($source." cannot be deleted");
209 209
 			}
210 210
 		}
211 211
 	}
@@ -258,10 +258,10 @@  discard block
 block discarded – undo
258 258
 					\OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME,
259 259
 					\OC\AppFramework\Http\Request::USER_AGENT_FREEBOX,
260 260
 				])) {
261
-				$response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"');
261
+				$response->addHeader('Content-Disposition', 'attachment; filename="'.rawurlencode($filename).'"');
262 262
 			} else {
263
-				$response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename)
264
-													 . '; filename="' . rawurlencode($filename) . '"');
263
+				$response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\''.rawurlencode($filename)
264
+													 . '; filename="'.rawurlencode($filename).'"');
265 265
 			}
266 266
 		}
267 267
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 				return $displayName;
326 326
 			});
327 327
 
328
-			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
328
+			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function() use ($node) {
329 329
 				return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
330 330
 			});
331 331
 			$propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 			list($path, $name) = \Sabre\HTTP\URLUtil::splitPath($filePath);
420 420
 			$info = \OC_FileChunking::decodeName($name);
421 421
 			if (!empty($info)) {
422
-				$filePath = $path . '/' . $info['name'];
422
+				$filePath = $path.'/'.$info['name'];
423 423
 			}
424 424
 		}
425 425
 
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/Migration/ValueFix.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 		$user = $argument['user'];
45 45
 
46 46
 		$pattern = '/;VALUE=:/';
47
- 		$principal = 'principals/users/' . $user;
47
+ 		$principal = 'principals/users/'.$user;
48 48
 		$calendars = $this->calDavBackend->getCalendarsForUser($principal);
49 49
 		foreach ($calendars as $calendar) {
50 50
 			$objects = $this->calDavBackend->getCalendarObjects($calendar['id']);
Please login to merge, or discard this patch.
apps/dav/lib/Migration/ValueFixInsert.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@
 block discarded – undo
53 53
 	}
54 54
 
55 55
 	public function run(IOutput $output) {
56
-		if ($this->config->getAppValue('dav', self::class . '_ran', 'false') !== 'true') {
57
-			$this->userManager->callForSeenUsers(function (IUser $user) {
56
+		if ($this->config->getAppValue('dav', self::class.'_ran', 'false') !== 'true') {
57
+			$this->userManager->callForSeenUsers(function(IUser $user) {
58 58
 				$this->jobList->add(ValueFix::class, ['user' => $user->getUID()]);
59 59
 			});
60
-			$this->config->setAppValue('dav', self::class . '_ran', 'true');
60
+			$this->config->setAppValue('dav', self::class.'_ran', 'true');
61 61
 		}
62 62
 	}
63 63
 }
Please login to merge, or discard this patch.
apps/dav/lib/Server.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$authPlugin->addBackend($authBackend);
100 100
 
101 101
 		// debugging
102
-		if(\OC::$server->getConfig()->getSystemValue('debug', false)) {
102
+		if (\OC::$server->getConfig()->getSystemValue('debug', false)) {
103 103
 			$this->server->addPlugin(new \Sabre\DAV\Browser\Plugin());
104 104
 		} else {
105 105
 			$this->server->addPlugin(new DummyGetResponsePlugin());
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 		// Some WebDAV clients do require Class 2 WebDAV support (locking), since
154 154
 		// we do not provide locking we emulate it using a fake locking plugin.
155
-		if($request->isUserAgent([
155
+		if ($request->isUserAgent([
156 156
 			'/WebDAVFS/',
157 157
 			'/Microsoft Office OneNote 2013/',
158 158
 		])) {
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		}
165 165
 
166 166
 		// wait with registering these until auth is handled and the filesystem is setup
167
-		$this->server->on('beforeMethod', function () {
167
+		$this->server->on('beforeMethod', function() {
168 168
 			// custom properties plugin must be the last one
169 169
 			$userSession = \OC::$server->getUserSession();
170 170
 			$user = $userSession->getUser();
Please login to merge, or discard this patch.
apps/dav/lib/Files/CustomPropertiesBackend.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 */
152 152
 	public function move($source, $destination) {
153 153
 		$statement = $this->connection->prepare(
154
-			'UPDATE `*PREFIX*properties` SET `propertypath` = ?' .
154
+			'UPDATE `*PREFIX*properties` SET `propertypath` = ?'.
155 155
 			' WHERE `userid` = ? AND `propertypath` = ?'
156 156
 		);
157 157
 		$statement->execute(array($destination, $this->user, $source));
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
 	 */
214 214
 	private function updateProperties($path, $properties) {
215 215
 
216
-		$deleteStatement = 'DELETE FROM `*PREFIX*properties`' .
216
+		$deleteStatement = 'DELETE FROM `*PREFIX*properties`'.
217 217
 			' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?';
218 218
 
219
-		$insertStatement = 'INSERT INTO `*PREFIX*properties`' .
219
+		$insertStatement = 'INSERT INTO `*PREFIX*properties`'.
220 220
 			' (`userid`,`propertypath`,`propertyname`,`propertyvalue`) VALUES(?,?,?,?)';
221 221
 
222
-		$updateStatement = 'UPDATE `*PREFIX*properties` SET `propertyvalue` = ?' .
222
+		$updateStatement = 'UPDATE `*PREFIX*properties` SET `propertyvalue` = ?'.
223 223
 			' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?';
224 224
 
225 225
 		// TODO: use "insert or update" strategy ?
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.