Completed
Pull Request — master (#87)
by Robin
01:28
created
appinfo/autoload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
28 28
 
29 29
 namespace OCA\Files_FullTextSearch\AppInfo;
30 30
 
31
-$composerDir = __DIR__ . '/../vendor/';
31
+$composerDir = __DIR__.'/../vendor/';
32 32
 
33
-if (is_dir($composerDir) && file_exists($composerDir . 'autoload.php')) {
34
-	require_once $composerDir . 'autoload.php';
33
+if (is_dir($composerDir) && file_exists($composerDir.'autoload.php')) {
34
+	require_once $composerDir.'autoload.php';
35 35
 }
36 36
 
Please login to merge, or discard this patch.
appinfo/app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 use OCP\AppFramework\QueryException;
30 30
 
31
-require_once __DIR__ . '/autoload.php';
31
+require_once __DIR__.'/autoload.php';
32 32
 
33 33
 
34 34
 $app = new Application();
Please login to merge, or discard this patch.
lib/Service/SearchService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	private function searchQueryShareNames(ISearchRequest $request) {
110 110
 		$username = $this->miscService->secureUsername($request->getAuthor());
111
-		$request->addField('share_names.' . $username);
111
+		$request->addField('share_names.'.$username);
112 112
 
113 113
 		$request->addWildcardField('title');
114
-		$request->addWildcardField('share_names.' . $username);
114
+		$request->addWildcardField('share_names.'.$username);
115 115
 	}
116 116
 
117 117
 
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
 		$currentDir = $this->withoutBeginSlash($this->withEndSlash($currentDir));
130 130
 		$request->addRegexFilters(
131 131
 			[
132
-				['share_names.' . $username => $currentDir . '.*'],
133
-				['title' => $currentDir . '.*']
132
+				['share_names.'.$username => $currentDir.'.*'],
133
+				['title' => $currentDir.'.*']
134 134
 			]
135 135
 		);
136 136
 	}
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 		$username = $this->miscService->secureUsername($request->getAuthor());
149 149
 		$request->addRegexFilters(
150 150
 			[
151
-				['share_names.' . $username => '.*\.' . $extension],
152
-				['title' => '.*\.' . $extension]
151
+				['share_names.'.$username => '.*\.'.$extension],
152
+				['title' => '.*\.'.$extension]
153 153
 			]
154 154
 		);
155 155
 	}
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 		if (in_array('filename', $in)) {
185 185
 			$username = $this->miscService->secureUsername($request->getAuthor());
186
-			$request->addLimitField('share_names.' . $username);
186
+			$request->addLimitField('share_names.'.$username);
187 187
 			$request->addLimitField('title');
188 188
 		}
189 189
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 	private function getWebdavId(int $fileId): string {
345 345
 		$instanceId = $this->configService->getSystemValue('instanceid');
346 346
 
347
-		return sprintf("%08s", $fileId) . $instanceId;
347
+		return sprintf("%08s", $fileId).$instanceId;
348 348
 	}
349 349
 
350 350
 
Please login to merge, or discard this patch.
lib/Db/CoreRequestBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	private function limitToDBField(IQueryBuilder &$qb, string $field, string $value) {
92 92
 		$expr = $qb->expr();
93
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : '';
94
-		$qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value)));
93
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : '';
94
+		$qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value)));
95 95
 	}
96 96
 
97 97
 
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	private function limitToDBFieldInt(IQueryBuilder &$qb, string $field, int $value) {
104 104
 		$expr = $qb->expr();
105
-		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : '';
106
-		$qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value)));
105
+		$pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias.'.' : '';
106
+		$qb->andWhere($expr->eq($pf.$field, $qb->createNamedParameter($value)));
107 107
 	}
108 108
 
109 109
 
Please login to merge, or discard this patch.
lib/Service/GroupFoldersService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
222 222
 		foreach ($mounts as $path => $mount) {
223 223
 			$mountPoint = new MountPoint();
224 224
 			$mountPoint->setId($this->getInt('id', $mount, -1))
225
-					   ->setPath('/' . $userId . '/files/' . $mount['mount_point'])
225
+					   ->setPath('/'.$userId.'/files/'.$mount['mount_point'])
226 226
 					   ->setGroups(array_keys($mount['groups']));
227 227
 			$mountPoints[] = $mountPoint;
228 228
 		}
Please login to merge, or discard this patch.
lib/Service/FilesService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1009,7 +1009,7 @@
 block discarded – undo
1009 1009
 	}
1010 1010
 
1011 1011
 	/**
1012
-	 * @param IIndexDocument $document
1012
+	 * @param FilesDocument $document
1013 1013
 	 * @param Throwable $t
1014 1014
 	 */
1015 1015
 	private function manageContentErrorException(IIndexDocument $document, Throwable $t) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 			$document->getIndex()
499 499
 					 ->setStatus(IIndex::INDEX_IGNORE);
500 500
 			$this->miscService->log(
501
-				'Exception while generateDocument: ' . $e->getMessage() . ' - trace: '
501
+				'Exception while generateDocument: '.$e->getMessage().' - trace: '
502 502
 				. json_encode($e->getTrace())
503 503
 			);
504 504
 		}
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 
688 688
 		$part = [];
689 689
 		foreach ($comments as $comment) {
690
-			$part[] = '<' . $comment->getActorId() . '> ' . $comment->getMessage();
690
+			$part[] = '<'.$comment->getActorId().'> '.$comment->getMessage();
691 691
 		}
692 692
 
693 693
 		$document->addPart('comments', implode(" \n ", $part));
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 
723 723
 			} catch (Exception $e) {
724 724
 				$this->miscService->log(
725
-					'Issue while getting information on documentId:' . $document->getId(), 0
725
+					'Issue while getting information on documentId:'.$document->getId(), 0
726 726
 				);
727 727
 			}
728 728
 		}
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
 			$path = '';
1153 1153
 		}
1154 1154
 
1155
-		return (($entrySlash) ? '/' : '') . $path;
1155
+		return (($entrySlash) ? '/' : '').$path;
1156 1156
 	}
1157 1157
 
1158 1158
 }
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
 
278 278
 
279 279
 	/**
280
-	 * @param $major
281
-	 * @param $sub
282
-	 * @param $minor
280
+	 * @param integer $major
281
+	 * @param integer $sub
282
+	 * @param integer $minor
283 283
 	 *
284 284
 	 * @return bool
285 285
 	 */
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 * Check if the path is excluded via configuration
296 296
 	 * and therefore the file shouldn't be indexed
297 297
 	 * 
298
-	 * @param $filePath The file to be indexed
298
+	 * @param string $filePath The file to be indexed
299 299
 	 * 
300 300
 	 * @return bool
301 301
 	 */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
 		}
331 331
 
332 332
 		// check 'startsWith'
333
-    	if ($len <= strlen($filePath) && substr($filePath, 0, $len) === $excludePath) {
333
+		if ($len <= strlen($filePath) && substr($filePath, 0, $len) === $excludePath) {
334 334
 			return true;
335 335
 		}
336 336
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	 */
242 242
 	public function setDocumentIndexOption(FilesDocument $document, string $option) {
243 243
 		$document->getIndex()
244
-				 ->addOption('_' . $option, (string)$this->getAppValue($option));
244
+				 ->addOption('_'.$option, (string)$this->getAppValue($option));
245 245
 	}
246 246
 
247 247
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 */
302 302
 	public function isPathExcluded($filePath): bool {
303 303
 		$excludedPaths = $this->getExcludedPaths();
304
-		foreach($excludedPaths as $excludedPath) {
304
+		foreach ($excludedPaths as $excludedPath) {
305 305
 			if ($this->isPathMatch($filePath, $excludedPath)) {
306 306
 				return true;
307 307
 			}
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 		}
336 336
 
337 337
 		// check regex match
338
-		$regexPattern = '/' . str_replace('/', '\/', $excludePath) . '/';
338
+		$regexPattern = '/'.str_replace('/', '\/', $excludePath).'/';
339 339
 		if (preg_match($regexPattern, $filePath)) {
340 340
 			return true;
341 341
 		}
Please login to merge, or discard this patch.