Completed
Pull Request — master (#171)
by Maxence
16s
created
lib/Service/ConfigService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
 	 */
237 237
 	public function setDocumentIndexOption(FilesDocument $document, string $option) {
238 238
 		$document->getIndex()
239
-				 ->addOption('_' . $option, (string)$this->getAppValue($option));
239
+				 ->addOption('_'.$option, (string)$this->getAppValue($option));
240 240
 	}
241 241
 
242 242
 
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 use Throwable;
43 43
 
44 44
 
45
-require_once __DIR__ . '/../../vendor/autoload.php';
45
+require_once __DIR__.'/../../vendor/autoload.php';
46 46
 
47 47
 
48 48
 /**
Please login to merge, or discard this patch.
lib/Service/SearchService.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		$this->searchQueryInOptions($request);
113 113
 		$this->searchQueryFiltersExtension($request);
114 114
 		$this->searchQueryFiltersSource($request);
115
-		if($this->userId === null) {
115
+		if ($this->userId === null) {
116 116
 			$this->userId = $this->miscService->secureUsername($request->getAuthor());
117 117
 		}
118 118
 		$request->addPart('comments');
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
 	 */
126 126
 	private function searchQueryShareNames(ISearchRequest $request) {
127 127
 		$username = $this->miscService->secureUsername($request->getAuthor());
128
-		$request->addField('share_names.' . $username);
128
+		$request->addField('share_names.'.$username);
129 129
 
130 130
 		$request->addWildcardField('title');
131
-		$request->addWildcardField('share_names.' . $username);
131
+		$request->addWildcardField('share_names.'.$username);
132 132
 	}
133 133
 
134 134
 
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 		$currentDir = $this->withoutBeginSlash($this->withEndSlash($currentDir));
147 147
 		$request->addRegexFilters(
148 148
 			[
149
-				['share_names.' . $username => $currentDir . '.*'],
150
-				['title' => $currentDir . '.*']
149
+				['share_names.'.$username => $currentDir.'.*'],
150
+				['title' => $currentDir.'.*']
151 151
 			]
152 152
 		);
153 153
 	}
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 		$username = $this->miscService->secureUsername($request->getAuthor());
166 166
 		$request->addRegexFilters(
167 167
 			[
168
-				['share_names.' . $username => '.*\.' . $extension],
169
-				['title' => '.*\.' . $extension]
168
+				['share_names.'.$username => '.*\.'.$extension],
169
+				['title' => '.*\.'.$extension]
170 170
 			]
171 171
 		);
172 172
 	}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
 		if (in_array('filename', $in)) {
202 202
 			$username = $this->miscService->secureUsername($request->getAuthor());
203
-			$request->addLimitField('share_names.' . $username);
203
+			$request->addLimitField('share_names.'.$username);
204 204
 			$request->addLimitField('title');
205 205
 		}
206 206
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 				$filesDocuments[] = $filesDocument;
254 254
 			} catch (Exception $e) {
255 255
 				$this->miscService->log(
256
-					'Exception while improving searchresult: ' . $e->getMessage() . ' - trace: '
256
+					'Exception while improving searchresult: '.$e->getMessage().' - trace: '
257 257
 					. json_encode($e->getTrace())
258 258
 				);
259 259
 			}
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 	private function getWebdavId(int $fileId): string {
373 373
 		$instanceId = $this->configService->getSystemValue('instanceid');
374 374
 
375
-		return sprintf("%08s", $fileId) . $instanceId;
375
+		return sprintf("%08s", $fileId).$instanceId;
376 376
 	}
377 377
 
378 378
 
Please login to merge, or discard this patch.
lib/Service/ExtensionService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @param FilesDocument $document
88 88
 	 * @param Node $file
89 89
 	 */
90
-	public function fileIndexing(FilesDocument &$document, Node $file) {
90
+	public function fileIndexing(FilesDocument & $document, Node $file) {
91 91
 		$this->dispatch('Files_FullTextSearch.onFileIndexing', ['file' => $file, 'document' => &$document]);
92 92
 	}
93 93
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	/**
96 96
 	 * @param ISearchRequest $request
97 97
 	 */
98
-	public function searchRequest(ISearchRequest &$request) {
98
+	public function searchRequest(ISearchRequest & $request) {
99 99
 		$this->dispatch('Files_FullTextSearch.onSearchRequest', ['request' => &$request]);
100 100
 	}
101 101
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	/**
104 104
 	 * @param ISearchResult $result
105 105
 	 */
106
-	public function searchResult(ISearchResult &$result) {
106
+	public function searchResult(ISearchResult & $result) {
107 107
 		$this->dispatch('Files_FullTextSearch.onSearchResult', ['result' => &$result]);
108 108
 	}
109 109
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	/**
112 112
 	 * @param IIndexDocument $document
113 113
 	 */
114
-	public function indexComparing(IIndexDocument &$document) {
114
+	public function indexComparing(IIndexDocument & $document) {
115 115
 		$this->dispatch('Files_FullTextSearch.onIndexComparing', ['document' => &$document]);
116 116
 	}
117 117
 
Please login to merge, or discard this patch.
lib/Service/ExternalFilesService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
 	 *
192 192
 	 * @throws FileIsNotIndexableException
193 193
 	 */
194
-	public function updateDocumentAccess(FilesDocument &$document, Node $file) {
194
+	public function updateDocumentAccess(FilesDocument & $document, Node $file) {
195 195
 		if ($document->getSource() !== ConfigService::FILES_EXTERNAL) {
196 196
 			return;
197 197
 		}
Please login to merge, or discard this patch.
lib/Service/GroupFoldersService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 * @param FilesDocument $document
164 164
 	 * @param Node $file
165 165
 	 */
166
-	public function updateDocumentAccess(FilesDocument &$document, Node $file) {
166
+	public function updateDocumentAccess(FilesDocument & $document, Node $file) {
167 167
 
168 168
 		if ($document->getSource() !== ConfigService::FILES_GROUP_FOLDERS) {
169 169
 			return;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		foreach ($mounts as $path => $mount) {
230 230
 			$mountPoint = new MountPoint();
231 231
 			$mountPoint->setId($this->getInt('id', $mount, -1))
232
-					   ->setPath('/' . $userId . '/files/' . $mount['mount_point'])
232
+					   ->setPath('/'.$userId.'/files/'.$mount['mount_point'])
233 233
 					   ->setGroups(array_keys($mount['groups']));
234 234
 			$mountPoints[] = $mountPoint;
235 235
 		}
Please login to merge, or discard this patch.
lib/Service/FilesService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 			$files = $this->rootFolder->getUserFolder($userId)
234 234
 									  ->get($indexOptions->getOption('path', '/'));
235 235
 		} catch (Throwable $e) {
236
-			$this->log(2, 'Issue while retrieving rootFolder for ' . $userId);
236
+			$this->log(2, 'Issue while retrieving rootFolder for '.$userId);
237 237
 
238 238
 			return [];
239 239
 		}
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 		$tagIds = $this->systemTagObjectMapper->getTagIdsForObjects([$file->getId()], 'files');
485 485
 		if (array_key_exists($file->getId(), $tagIds)) {
486 486
 			$tags = array_values(
487
-				array_map(function (ISystemTag $tag): string {
487
+				array_map(function(ISystemTag $tag): string {
488 488
 					return $tag->getName();
489 489
 				}, $this->systemTagManager->getTagsByIds($tagIds[$file->getId()]))
490 490
 			);
@@ -617,8 +617,8 @@  discard block
 block discarded – undo
617 617
 			$document->getIndex()
618 618
 					 ->setStatus(IIndex::INDEX_IGNORE);
619 619
 			$this->miscService->log(
620
-				'Exception while generateDocument: ' . $e->getMessage() . ' (' . get_class($e) . ') at '
621
-				. $e->getFile() . ' line ' . $e->getLine()
620
+				'Exception while generateDocument: '.$e->getMessage().' ('.get_class($e).') at '
621
+				. $e->getFile().' line '.$e->getLine()
622 622
 			);
623 623
 		}
624 624
 	}
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 
825 825
 		$part = [];
826 826
 		foreach ($comments as $comment) {
827
-			$part[] = '<' . $comment->getActorId() . '> ' . $comment->getMessage();
827
+			$part[] = '<'.$comment->getActorId().'> '.$comment->getMessage();
828 828
 		}
829 829
 
830 830
 		$document->addPart('comments', implode(" \n ", $part));
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 
862 862
 			} catch (Throwable $e) {
863 863
 				$this->miscService->log(
864
-					'Issue while getting information on documentId:' . $document->getId(), 0
864
+					'Issue while getting information on documentId:'.$document->getId(), 0
865 865
 				);
866 866
 			}
867 867
 		}
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
 			$path = '';
1305 1305
 		}
1306 1306
 
1307
-		$result = (($entrySlash) ? '/' : '') . $path;
1307
+		$result = (($entrySlash) ? '/' : '').$path;
1308 1308
 		$this->debug(
1309 1309
 			'getPathFromRoot', [
1310 1310
 								 'path' => $path,
Please login to merge, or discard this patch.