Completed
Pull Request — stable10 (#6492)
by Morris
11:41
created
apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,6 +114,6 @@
 block discarded – undo
114 114
 			'Line' => $ex->getLine(),
115 115
 			'User' => $user,
116 116
 		];
117
-		$this->logger->log($level, 'Exception: ' . json_encode($exception), ['app' => $this->appName]);
117
+		$this->logger->log($level, 'Exception: '.json_encode($exception), ['app' => $this->appName]);
118 118
 	}
119 119
 }
Please login to merge, or discard this patch.
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/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/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/Upload/AssemblyStream.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		// build additional information
75 75
 		$this->sortedNodes = [];
76 76
 		$start = 0;
77
-		foreach($this->nodes as $node) {
77
+		foreach ($this->nodes as $node) {
78 78
 			$size = $node->getSize();
79 79
 			$name = $node->getName();
80 80
 			$this->sortedNodes[$name] = ['node' => $node, 'start' => $start, 'end' => $start + $size];
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 		if (isset($context[$name])) {
217 217
 			$context = $context[$name];
218 218
 		} else {
219
-			throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
219
+			throw new \BadMethodCallException('Invalid context, "'.$name.'" options not set');
220 220
 		}
221 221
 		if (isset($context['nodes']) and is_array($context['nodes'])) {
222 222
 			$this->nodes = $context['nodes'];
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	 * @return IFile | null
254 254
 	 */
255 255
 	private function getNodeForPosition($pos) {
256
-		foreach($this->sortedNodes as $node) {
256
+		foreach ($this->sortedNodes as $node) {
257 257
 			if ($pos >= $node['start'] && $pos < $node['end']) {
258 258
 				return [$node['node'], $pos - $node['start']];
259 259
 			}
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 			return $data;
272 272
 		}
273 273
 
274
-		return fopen('data://text/plain,' . $data,'r');
274
+		return fopen('data://text/plain,'.$data, 'r');
275 275
 	}
276 276
 
277 277
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarHome.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,6 +109,6 @@
 block discarded – undo
109 109
 
110 110
 		}
111 111
 
112
-		throw new NotFound('Node with name \'' . $name . '\' could not be found');
112
+		throw new NotFound('Node with name \''.$name.'\' could not be found');
113 113
 	}
114 114
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,17 +95,17 @@  discard block
 block discarded – undo
95 95
 		$subject = 'SabreDAV iTIP message';
96 96
 		switch (strtoupper($iTipMessage->method)) {
97 97
 			case 'REPLY' :
98
-				$subject = 'Re: ' . $summary;
98
+				$subject = 'Re: '.$summary;
99 99
 				break;
100 100
 			case 'REQUEST' :
101 101
 				$subject = $summary;
102 102
 				break;
103 103
 			case 'CANCEL' :
104
-				$subject = 'Cancelled: ' . $summary;
104
+				$subject = 'Cancelled: '.$summary;
105 105
 				break;
106 106
 		}
107 107
 
108
-		$contentType = 'text/calendar; charset=UTF-8; method=' . $iTipMessage->method;
108
+		$contentType = 'text/calendar; charset=UTF-8; method='.$iTipMessage->method;
109 109
 
110 110
 		$message = $this->mailer->createMessage();
111 111
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 				$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
121 121
 			}
122 122
 			$iTipMessage->scheduleStatus = '1.1; Scheduling message is sent via iMip';
123
-		} catch(\Exception $ex) {
123
+		} catch (\Exception $ex) {
124 124
 			$this->logger->logException($ex, ['app' => 'dav']);
125 125
 			$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
126 126
 		}
Please login to merge, or discard this patch.