@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @return bool |
106 | 106 | */ |
107 | 107 | public function isCodeCheckEnforced(): bool { |
108 | - $notSignedChannels = [ '', 'git']; |
|
108 | + $notSignedChannels = ['', 'git']; |
|
109 | 109 | if (\in_array($this->environmentHelper->getChannel(), $notSignedChannels, true)) { |
110 | 110 | return false; |
111 | 111 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | // Thus we ignore everything below the first occurrence of |
192 | 192 | // "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####" and have the |
193 | 193 | // hash generated based on this. |
194 | - if ($filename === $this->environmentHelper->getServerRoot() . '/.htaccess') { |
|
194 | + if ($filename === $this->environmentHelper->getServerRoot().'/.htaccess') { |
|
195 | 195 | $fileContent = file_get_contents($filename); |
196 | 196 | $explodedArray = explode('#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####', $fileContent); |
197 | 197 | if (\count($explodedArray) === 2) { |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | continue; |
200 | 200 | } |
201 | 201 | } |
202 | - if ($filename === $this->environmentHelper->getServerRoot() . '/core/js/mimetypelist.js') { |
|
202 | + if ($filename === $this->environmentHelper->getServerRoot().'/core/js/mimetypelist.js') { |
|
203 | 203 | $oldMimetypeList = new GenerateMimetypeFileBuilder(); |
204 | 204 | $newFile = $oldMimetypeList->generateFile($this->mimeTypeDetector->getAllAliases()); |
205 | 205 | if ($newFile === file_get_contents($filename)) { |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | public function writeAppSignature($path, |
252 | 252 | X509 $certificate, |
253 | 253 | RSA $privateKey) { |
254 | - $appInfoDir = $path . '/appinfo'; |
|
254 | + $appInfoDir = $path.'/appinfo'; |
|
255 | 255 | try { |
256 | 256 | $this->fileAccessHelper->assertDirectoryExists($appInfoDir); |
257 | 257 | |
@@ -259,12 +259,12 @@ discard block |
||
259 | 259 | $hashes = $this->generateHashes($iterator, $path); |
260 | 260 | $signature = $this->createSignatureData($hashes, $certificate, $privateKey); |
261 | 261 | $this->fileAccessHelper->file_put_contents( |
262 | - $appInfoDir . '/signature.json', |
|
262 | + $appInfoDir.'/signature.json', |
|
263 | 263 | json_encode($signature, JSON_PRETTY_PRINT) |
264 | 264 | ); |
265 | 265 | } catch (\Exception $e) { |
266 | 266 | if (!$this->fileAccessHelper->is_writable($appInfoDir)) { |
267 | - throw new \Exception($appInfoDir . ' is not writable'); |
|
267 | + throw new \Exception($appInfoDir.' is not writable'); |
|
268 | 268 | } |
269 | 269 | throw $e; |
270 | 270 | } |
@@ -281,19 +281,19 @@ discard block |
||
281 | 281 | public function writeCoreSignature(X509 $certificate, |
282 | 282 | RSA $rsa, |
283 | 283 | $path) { |
284 | - $coreDir = $path . '/core'; |
|
284 | + $coreDir = $path.'/core'; |
|
285 | 285 | try { |
286 | 286 | $this->fileAccessHelper->assertDirectoryExists($coreDir); |
287 | 287 | $iterator = $this->getFolderIterator($path, $path); |
288 | 288 | $hashes = $this->generateHashes($iterator, $path); |
289 | 289 | $signatureData = $this->createSignatureData($hashes, $certificate, $rsa); |
290 | 290 | $this->fileAccessHelper->file_put_contents( |
291 | - $coreDir . '/signature.json', |
|
291 | + $coreDir.'/signature.json', |
|
292 | 292 | json_encode($signatureData, JSON_PRETTY_PRINT) |
293 | 293 | ); |
294 | 294 | } catch (\Exception $e) { |
295 | 295 | if (!$this->fileAccessHelper->is_writable($coreDir)) { |
296 | - throw new \Exception($coreDir . ' is not writable'); |
|
296 | + throw new \Exception($coreDir.' is not writable'); |
|
297 | 297 | } |
298 | 298 | throw $e; |
299 | 299 | } |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | $path = $this->appLocator->getAppPath($appId); |
500 | 500 | } |
501 | 501 | $result = $this->verify( |
502 | - $path . '/appinfo/signature.json', |
|
502 | + $path.'/appinfo/signature.json', |
|
503 | 503 | $path, |
504 | 504 | $appId, |
505 | 505 | $forceVerify |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | public function verifyCoreSignature(): array { |
551 | 551 | try { |
552 | 552 | $result = $this->verify( |
553 | - $this->environmentHelper->getServerRoot() . '/core/signature.json', |
|
553 | + $this->environmentHelper->getServerRoot().'/core/signature.json', |
|
554 | 554 | $this->environmentHelper->getServerRoot(), |
555 | 555 | 'core' |
556 | 556 | ); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | $appNeedsToBeChecked = false; |
582 | 582 | if ($isShipped) { |
583 | 583 | $appNeedsToBeChecked = true; |
584 | - } elseif ($this->fileAccessHelper->file_exists($this->appLocator->getAppPath($appId) . '/appinfo/signature.json')) { |
|
584 | + } elseif ($this->fileAccessHelper->file_exists($this->appLocator->getAppPath($appId).'/appinfo/signature.json')) { |
|
585 | 585 | // Otherwise only if the application explicitly ships a signature.json file |
586 | 586 | $appNeedsToBeChecked = true; |
587 | 587 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | */ |
70 | 70 | protected function execute(InputInterface $input, OutputInterface $output): int { |
71 | 71 | $appid = $input->getArgument('appid'); |
72 | - $path = (string)$input->getOption('path'); |
|
72 | + $path = (string) $input->getOption('path'); |
|
73 | 73 | $result = $this->checker->verifyAppSignature($appid, $path, true); |
74 | 74 | $this->writeArrayInOutputFormat($input, $output, $result); |
75 | 75 | if (count($result) > 0) { |