@@ -67,12 +67,14 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $packagePath = $this->storage->getAdapter()->applyPathPrefix(static::PACKAGE_FILENAME); |
| 69 | 69 | |
| 70 | - if ($this->storage->has(static::PACKAGE_FILENAME)) { |
|
| 70 | + if ($this->storage->has(static::PACKAGE_FILENAME)) |
|
| 71 | + { |
|
| 71 | 72 | return $packagePath; |
| 72 | 73 | } |
| 73 | 74 | |
| 74 | 75 | $this->zip = new \ZipArchive(); |
| 75 | - if ($this->zip->open($packagePath, \ZipArchive::CREATE) !== true) { |
|
| 76 | + if ($this->zip->open($packagePath, \ZipArchive::CREATE) !== true) |
|
| 77 | + { |
|
| 76 | 78 | return false; |
| 77 | 79 | } |
| 78 | 80 | |
@@ -97,7 +99,8 @@ discard block |
||
| 97 | 99 | */ |
| 98 | 100 | protected function addIcons() |
| 99 | 101 | { |
| 100 | - foreach ($this->icons as $file) { |
|
| 102 | + foreach ($this->icons as $file) |
|
| 103 | + { |
|
| 101 | 104 | $this->addFile('icon.iconset/' . $file, $file); |
| 102 | 105 | } |
| 103 | 106 | } |
@@ -148,7 +151,8 @@ discard block |
||
| 148 | 151 | $password = $this->certificate->getPassword(); |
| 149 | 152 | |
| 150 | 153 | $certs = []; |
| 151 | - if (! openssl_pkcs12_read($pkcs12, $certs, $password)) { |
|
| 154 | + if (! openssl_pkcs12_read($pkcs12, $certs, $password)) |
|
| 155 | + { |
|
| 152 | 156 | throw new \RuntimeException(openssl_error_string()); |
| 153 | 157 | } |
| 154 | 158 | |
@@ -164,7 +168,8 @@ discard block |
||
| 164 | 168 | // Convert the signature from PEM to DER |
| 165 | 169 | $signature_pem = file_get_contents($signaturePath); |
| 166 | 170 | $matches = []; |
| 167 | - if (! preg_match('~Content-Disposition:[^\n]+\s*?([A-Za-z0-9+=/\r\n]+)\s*?-----~', $signature_pem, $matches)) { |
|
| 171 | + if (! preg_match('~Content-Disposition:[^\n]+\s*?([A-Za-z0-9+=/\r\n]+)\s*?-----~', $signature_pem, $matches)) |
|
| 172 | + { |
|
| 168 | 173 | throw new \RuntimeException(openssl_error_string()); |
| 169 | 174 | } |
| 170 | 175 | |