Completed
Pull Request — master (#5415)
by Robin
14:26
created
apps/dav/lib/Files/FileSearchBackend.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		/** @var Folder $folder $results */
156 156
 		$results = $folder->search($query);
157 157
 
158
-		return array_map(function (Node $node) {
158
+		return array_map(function(Node $node) {
159 159
 			if ($node instanceof Folder) {
160 160
 				$davNode = new \OCA\DAV\Connector\Sabre\Directory($this->view, $node, $this->tree, $this->shareManager);
161 161
 			} else {
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 	 * @return string
173 173
 	 */
174 174
 	private function getHrefForNode(Node $node) {
175
-		$base = '/files/' . $this->user->getUID();
176
-		return $base . $this->view->getRelativePath($node->getPath());
175
+		$base = '/files/'.$this->user->getUID();
176
+		return $base.$this->view->getRelativePath($node->getPath());
177 177
 	}
178 178
 
179 179
 	/**
@@ -213,19 +213,19 @@  discard block
 block discarded – undo
213 213
 			case Operator::OPERATION_LESS_THAN:
214 214
 			case Operator::OPERATION_IS_LIKE:
215 215
 				if (count($operator->arguments) !== 2) {
216
-					throw new \InvalidArgumentException('Invalid number of arguments for ' . $trimmedType . ' operation');
216
+					throw new \InvalidArgumentException('Invalid number of arguments for '.$trimmedType.' operation');
217 217
 				}
218 218
 				if (!is_string($operator->arguments[0])) {
219
-					throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
219
+					throw new \InvalidArgumentException('Invalid argument 1 for '.$trimmedType.' operation, expected property');
220 220
 				}
221 221
 				if (!($operator->arguments[1] instanceof Literal)) {
222
-					throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
222
+					throw new \InvalidArgumentException('Invalid argument 2 for '.$trimmedType.' operation, expected literal');
223 223
 				}
224 224
 				return new SearchComparison($trimmedType, $this->mapPropertyNameToColumn($operator->arguments[0]), $this->castValue($operator->arguments[0], $operator->arguments[1]->value));
225 225
 			case Operator::OPERATION_IS_COLLECTION:
226 226
 				return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE);
227 227
 			default:
228
-				throw new \InvalidArgumentException('Unsupported operation ' . $trimmedType . ' (' . $operator->type . ')');
228
+				throw new \InvalidArgumentException('Unsupported operation '.$trimmedType.' ('.$operator->type.')');
229 229
 		}
230 230
 	}
231 231
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 			case FilesPlugin::INTERNAL_FILEID_PROPERTYNAME:
251 251
 				return 'fileid';
252 252
 			default:
253
-				throw new \InvalidArgumentException('Unsupported property for search or order: ' . $propertyName);
253
+				throw new \InvalidArgumentException('Unsupported property for search or order: '.$propertyName);
254 254
 		}
255 255
 	}
256 256
 
Please login to merge, or discard this patch.