Completed
Pull Request — master (#8023)
by Robin
23:34 queued 07:44
created
apps/dav/lib/Files/FileSearchBackend.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 		$results = $folder->search($query);
159 159
 
160 160
 		/** @var SearchResult[] $nodes */
161
-		$nodes = array_map(function (Node $node) {
161
+		$nodes = array_map(function(Node $node) {
162 162
 			if ($node instanceof Folder) {
163 163
 				$davNode = new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager);
164 164
 			} else {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		}, $results);
171 171
 
172 172
 		// Sort again, since the result from multiple storages is appended and not sorted
173
-		usort($nodes, function (SearchResult $a, SearchResult $b) use ($search) {
173
+		usort($nodes, function(SearchResult $a, SearchResult $b) use ($search) {
174 174
 			return $this->sort($a, $b, $search->orderBy);
175 175
 		});
176 176
 
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
 	 * @return string
260 260
 	 */
261 261
 	private function getHrefForNode(Node $node) {
262
-		$base = '/files/' . $this->user->getUID();
263
-		return $base . $this->view->getRelativePath($node->getPath());
262
+		$base = '/files/'.$this->user->getUID();
263
+		return $base.$this->view->getRelativePath($node->getPath());
264 264
 	}
265 265
 
266 266
 	/**
@@ -301,19 +301,19 @@  discard block
 block discarded – undo
301 301
 			case Operator::OPERATION_LESS_THAN:
302 302
 			case Operator::OPERATION_IS_LIKE:
303 303
 				if (count($operator->arguments) !== 2) {
304
-					throw new \InvalidArgumentException('Invalid number of arguments for ' . $trimmedType . ' operation');
304
+					throw new \InvalidArgumentException('Invalid number of arguments for '.$trimmedType.' operation');
305 305
 				}
306 306
 				if (!($operator->arguments[0] instanceof SearchPropertyDefinition)) {
307
-					throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
307
+					throw new \InvalidArgumentException('Invalid argument 1 for '.$trimmedType.' operation, expected property');
308 308
 				}
309 309
 				if (!($operator->arguments[1] instanceof Literal)) {
310
-					throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
310
+					throw new \InvalidArgumentException('Invalid argument 2 for '.$trimmedType.' operation, expected literal');
311 311
 				}
312 312
 				return new SearchComparison($trimmedType, $this->mapPropertyNameToColumn($operator->arguments[0]), $this->castValue($operator->arguments[0], $operator->arguments[1]->value));
313 313
 			case Operator::OPERATION_IS_COLLECTION:
314 314
 				return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE);
315 315
 			default:
316
-				throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType . ' (' . $operator->type . ')');
316
+				throw new \InvalidArgumentException('Unsupported operation '.$trimmedType.' ('.$operator->type.')');
317 317
 		}
318 318
 	}
319 319
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 			case FilesPlugin::INTERNAL_FILEID_PROPERTYNAME:
339 339
 				return 'fileid';
340 340
 			default:
341
-				throw new \InvalidArgumentException('Unsupported property for search or order: ' . $property->name);
341
+				throw new \InvalidArgumentException('Unsupported property for search or order: '.$property->name);
342 342
 		}
343 343
 	}
344 344
 
Please login to merge, or discard this patch.