@@ -420,6 +420,9 @@ discard block |
||
420 | 420 | .sprintf('%s.phar.temp.pubkey', $this->getLocalPharFileBasename()); |
421 | 421 | } |
422 | 422 | |
423 | + /** |
|
424 | + * @param string|null $localPharFile |
|
425 | + */ |
|
423 | 426 | protected function setLocalPharFile($localPharFile) |
424 | 427 | { |
425 | 428 | if (!is_null($localPharFile)) { |
@@ -464,6 +467,9 @@ discard block |
||
464 | 467 | $this->tempDirectory = $tempDirectory; |
465 | 468 | } |
466 | 469 | |
470 | + /** |
|
471 | + * @param string $phar |
|
472 | + */ |
|
467 | 473 | protected function validatePhar($phar) |
468 | 474 | { |
469 | 475 | $phar = realpath($phar); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | protected function setLocalPubKeyFile() |
446 | 446 | { |
447 | - $localPubKeyFile = $this->getLocalPharFile().'.pubkey'; |
|
447 | + $localPubKeyFile = $this->getLocalPharFile() . '.pubkey'; |
|
448 | 448 | if (!file_exists($localPubKeyFile)) { |
449 | 449 | throw new RuntimeException(sprintf( |
450 | 450 | 'The phar pubkey file does not exist: %s.', $localPubKeyFile |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | { |
469 | 469 | $phar = realpath($phar); |
470 | 470 | if ($this->hasPubKey()) { |
471 | - copy($this->getLocalPubKeyFile(), $phar.'.pubkey'); |
|
471 | + copy($this->getLocalPubKeyFile(), $phar . '.pubkey'); |
|
472 | 472 | } |
473 | 473 | chmod($phar, fileperms($this->getLocalPharFile())); |
474 | 474 | /* Switch invalid key errors to RuntimeExceptions */ |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | } |
483 | 483 | restore_error_handler(); |
484 | 484 | if ($this->hasPubKey()) { |
485 | - @unlink($phar.'.pubkey'); |
|
485 | + @unlink($phar . '.pubkey'); |
|
486 | 486 | } |
487 | 487 | unset($phar); |
488 | 488 | } |
@@ -98,7 +98,7 @@ |
||
98 | 98 | if (null === $package || json_last_error() !== JSON_ERROR_NONE) { |
99 | 99 | throw new JsonParsingException( |
100 | 100 | 'Error parsing JSON package data' |
101 | - .(function_exists('json_last_error_msg') ? ': '.json_last_error_msg() : '') |
|
101 | + .(function_exists('json_last_error_msg') ? ': ' . json_last_error_msg() : '') |
|
102 | 102 | ); |
103 | 103 | } |
104 | 104 |