Completed
Push — master ( 83d93d...f27f45 )
by Joas
29:23
created
lib/private/Profiler/FileProfilerStorage.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 /**
5 5
  * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
6 6
  * SPDX-License-Identifier: AGPL-3.0-or-later
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		while (\count($result) < $limit && $line = $this->readLineFromFile($file)) {
58 58
 			$values = str_getcsv($line);
59 59
 			[$csvToken, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode] = $values;
60
-			$csvTime = (int)$csvTime;
60
+			$csvTime = (int) $csvTime;
61 61
 
62 62
 			if (($url && !str_contains($csvUrl, $url))
63 63
 				|| ($method && !str_contains($csvMethod, $method))
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		// when there are errors in sub-requests, the parent and/or children tokens
145 145
 		// may equal the profile token, resulting in infinite loops
146 146
 		$parentToken = $profile->getParentToken() !== $profileToken ? $profile->getParentToken() : null;
147
-		$childrenToken = array_filter(array_map(function (IProfile $p) use ($profileToken) {
147
+		$childrenToken = array_filter(array_map(function(IProfile $p) use ($profileToken) {
148 148
 			return $profileToken !== $p->getToken() ? $p->getToken() : null;
149 149
 		}, $profile->getChildren()));
150 150
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 	protected function escapeFormulae(?string $value): ?string {
194 194
 		if ($value !== null && preg_match('/^[=+\-@\t\r]/', $value)) {
195
-			return "'" . $value;
195
+			return "'".$value;
196 196
 		}
197 197
 		return $value;
198 198
 	}
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		$folderA = substr($token, -2, 2);
208 208
 		$folderB = substr($token, -4, 2);
209 209
 
210
-		return $this->folder . '/' . $folderA . '/' . $folderB . '/' . $token;
210
+		return $this->folder.'/'.$folderA.'/'.$folderB.'/'.$token;
211 211
 	}
212 212
 
213 213
 	/**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @return string The index filename
217 217
 	 */
218 218
 	protected function getIndexFilename(): string {
219
-		return $this->folder . '/index.csv';
219
+		return $this->folder.'/index.csv';
220 220
 	}
221 221
 
222 222
 	/**
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
 			$buffer = fread($file, $chunkSize);
250 250
 
251 251
 			if (false === ($upTo = strrpos($buffer, "\n"))) {
252
-				$line = $buffer . $line;
252
+				$line = $buffer.$line;
253 253
 				continue;
254 254
 			}
255 255
 
256 256
 			$position += $upTo;
257
-			$line = substr($buffer, $upTo + 1) . $line;
257
+			$line = substr($buffer, $upTo + 1).$line;
258 258
 			fseek($file, max(0, $position), \SEEK_SET);
259 259
 
260 260
 			if ($line !== '') {
Please login to merge, or discard this patch.