@@ -113,19 +113,19 @@ |
||
113 | 113 | // Initial call contains only the sections and need to extract the tabs |
114 | 114 | if (is_array($structureElement)) { |
115 | 115 | if (isset($structureElement['tab'])) { |
116 | - $pathLabel = $this->tabMap[$structureElement['tab']]['label']; |
|
116 | + $pathLabel = $this->tabMap[$structureElement['tab']]['label']; |
|
117 | 117 | } |
118 | 118 | $structureElement = $this->configStructure->getElement($structureElement['id']); |
119 | 119 | } |
120 | 120 | |
121 | - if (mb_stripos((string)$structureElement->getLabel(), $searchTerm) !== false |
|
122 | - || mb_stripos((string)$structureElement->getComment(), $searchTerm) !== false |
|
121 | + if (mb_stripos((string) $structureElement->getLabel(), $searchTerm) !== false |
|
122 | + || mb_stripos((string) $structureElement->getComment(), $searchTerm) !== false |
|
123 | 123 | ) { |
124 | 124 | $elementData = $structureElement->getData(); |
125 | 125 | $this->results[] = [ |
126 | 126 | 'id' => trim($structureElement->getPath(), '/'), |
127 | 127 | 'type' => $elementData['_elementType'], |
128 | - 'name' => trim($pathLabel . ' / ' . trim((string)$structureElement->getLabel()), '/'), |
|
128 | + 'name' => trim($pathLabel . ' / ' . trim((string) $structureElement->getLabel()), '/'), |
|
129 | 129 | ]; |
130 | 130 | } |
131 | 131 |
@@ -193,7 +193,7 @@ |
||
193 | 193 | if (!isset($this->infos[$settingArgument])) { |
194 | 194 | throw new InvalidArgumentException('Unknown key: ' . $settingArgument); |
195 | 195 | } |
196 | - $output->writeln((string)$this->infos[$settingArgument]); |
|
196 | + $output->writeln((string) $this->infos[$settingArgument]); |
|
197 | 197 | } else { |
198 | 198 | $this->getHelper('table') |
199 | 199 | ->setHeaders(['name', 'value']) |
@@ -19,8 +19,8 @@ |
||
19 | 19 | */ |
20 | 20 | public function __construct(?InputInterface $input = null) |
21 | 21 | { |
22 | - $this->compressionLevel = $input ? (int)$input->getOption('zstd-level') : 10; |
|
23 | - $this->extraArgs = $input ? (string)$input->getOption('zstd-extra-args') : ''; |
|
22 | + $this->compressionLevel = $input ? (int) $input->getOption('zstd-level') : 10; |
|
23 | + $this->extraArgs = $input ? (string) $input->getOption('zstd-extra-args') : ''; |
|
24 | 24 | |
25 | 25 | parent::__construct($input); |
26 | 26 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | ); |
144 | 144 | |
145 | 145 | // Check if the requested file exists via HEAD |
146 | - $existsCheck = CurlClient::curlHead($remotePharDownloadUrl); |
|
146 | + $existsCheck = CurlClient::curlHead($remotePharDownloadUrl); |
|
147 | 147 | if (!$existsCheck->success) { |
148 | 148 | throw new RuntimeException( |
149 | 149 | sprintf('Requested version "%s" could not be found at %s', $requestedVersion, $remotePharDownloadUrl) |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | if ($attempt >= $maxRetries) { |
368 | 368 | // Extract HTTP status code from error message if present |
369 | 369 | if (preg_match('/HTTP (\d+)/', $e->getMessage(), $matches)) { |
370 | - $statusCode = (int)$matches[1]; |
|
370 | + $statusCode = (int) $matches[1]; |
|
371 | 371 | // For HTTP 200-299 range, provide a clearer error message |
372 | 372 | if ($statusCode >= 200 && $statusCode < 300) { |
373 | 373 | throw new RuntimeException("Download failed after {$maxRetries} attempts despite receiving HTTP {$statusCode} (OK) responses. Check network connectivity and file integrity."); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | private function getRemoteFileSize(OutputInterface $output, string $remoteUrl): int |
388 | 388 | { |
389 | - $head = CurlClient::curlHead($remoteUrl, [], [ |
|
389 | + $head = CurlClient::curlHead($remoteUrl, [], [ |
|
390 | 390 | 'timeout' => 20, |
391 | 391 | 'connect_timeout' => 10, |
392 | 392 | ]); |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | // Check for "transfer closed with X bytes remaining to read" error |
497 | 497 | if (preg_match('/transfer closed with (\d+) bytes remaining to read/', $msg, $matches)) { |
498 | 498 | $isTransferClosedError = true; |
499 | - $bytesRemaining = (int)$matches[1]; |
|
499 | + $bytesRemaining = (int) $matches[1]; |
|
500 | 500 | $output->writeln("<comment>Transfer closed error detected: $bytesRemaining bytes remaining</comment>"); |
501 | 501 | $output->writeln("<comment>This is likely due to a network interruption or server timeout.</comment>"); |
502 | 502 | } |