Code Duplication    Length = 3-3 lines in 2 locations

apps/dav/lib/Files/FileSearchBackend.php 2 locations

@@ 215-217 (lines=3) @@
212
				if (count($operator->arguments) !== 2) {
213
					throw new \InvalidArgumentException('Invalid number of arguments for ' . $trimmedType . ' operation');
214
				}
215
				if (!is_string($operator->arguments[0])) {
216
					throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
217
				}
218
				if (!($operator->arguments[1] instanceof Literal)) {
219
					throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
220
				}
@@ 218-220 (lines=3) @@
215
				if (!is_string($operator->arguments[0])) {
216
					throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
217
				}
218
				if (!($operator->arguments[1] instanceof Literal)) {
219
					throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
220
				}
221
				return new SearchComparison($trimmedType, $this->mapPropertyNameToColumn($operator->arguments[0]), $this->castValue($operator->arguments[0], $operator->arguments[1]->value));
222
			case Operator::OPERATION_IS_COLLECTION:
223
				return new SearchComparison('eq', 'mimetype', ICacheEntry::DIRECTORY_MIMETYPE);