Completed
Pull Request — master (#329)
by Maxence
23s
created
lib/Service/ConfigService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	}
41 41
 
42 42
 	public function setConfig(array $save): void {
43
-		foreach(array_keys($save) as $k) {
44
-			switch($k) {
43
+		foreach (array_keys($save) as $k) {
44
+			switch ($k) {
45 45
 				case ConfigLexicon::FILES_EXTERNAL:
46 46
 				case ConfigLexicon::FILES_SIZE:
47 47
 				case ConfigLexicon::FILES_CHUNK_SIZE:
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	}
62 62
 
63 63
 	public function setDocumentIndexOption(FilesDocument $document, string $option) {
64
-		$document->getIndex()->addOption('_' . $option, $this->getCurrentIndexOptionStatus($option) ? '1' : '0');
64
+		$document->getIndex()->addOption('_'.$option, $this->getCurrentIndexOptionStatus($option) ? '1' : '0');
65 65
 	}
66 66
 
67 67
 	/**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 			] as $k
125 125
 		) {
126 126
 			if (is_string($data[$k] ?? false)) {
127
-				$data[$k] = (int) $data[$k];
127
+				$data[$k] = (int)$data[$k];
128 128
 			}
129 129
 		}
130 130
 
Please login to merge, or discard this patch.
lib/Service/SearchService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	private function searchQueryShareNames(ISearchRequest $request) {
70 70
 		$username = $this->filesService->secureUsername($request->getAuthor());
71
-		$request->addField('share_names.' . $username);
71
+		$request->addField('share_names.'.$username);
72 72
 
73 73
 		$request->addWildcardField('title');
74
-		$request->addWildcardField('share_names.' . $username);
74
+		$request->addWildcardField('share_names.'.$username);
75 75
 	}
76 76
 
77 77
 
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 		}
86 86
 
87 87
 		$username = $this->filesService->secureUsername($request->getAuthor());
88
-		$currentDir = trim(str_replace('//', '/', $currentDir), '/') . '/'; // we want the format 'folder/'
88
+		$currentDir = trim(str_replace('//', '/', $currentDir), '/').'/'; // we want the format 'folder/'
89 89
 		$request->addRegexFilters(
90 90
 			[
91
-				['share_names.' . $username => $currentDir . '.*'],
92
-				['title' => $currentDir . '.*']
91
+				['share_names.'.$username => $currentDir.'.*'],
92
+				['title' => $currentDir.'.*']
93 93
 			]
94 94
 		);
95 95
 	}
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 		$username = $this->filesService->secureUsername($request->getAuthor());
108 108
 		$request->addRegexFilters(
109 109
 			[
110
-				['share_names.' . $username => '.*\.' . $extension],
111
-				['title' => '.*\.' . $extension]
110
+				['share_names.'.$username => '.*\.'.$extension],
111
+				['title' => '.*\.'.$extension]
112 112
 			]
113 113
 		);
114 114
 	}
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 		if (in_array('filename', $in)) {
143 143
 			$username = $this->filesService->secureUsername($request->getAuthor());
144
-			$request->addLimitField('share_names.' . $username);
144
+			$request->addLimitField('share_names.'.$username);
145 145
 			$request->addLimitField('title');
146 146
 		}
147 147
 
@@ -315,6 +315,6 @@  discard block
 block discarded – undo
315 315
 	 * @return string
316 316
 	 */
317 317
 	private function getWebdavId(int $fileId): string {
318
-		return sprintf("%08s", $fileId) . $this->config->getSystemValue('instanceid');
318
+		return sprintf("%08s", $fileId).$this->config->getSystemValue('instanceid');
319 319
 	}
320 320
 }
Please login to merge, or discard this patch.