@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | private function loadExistingOrder($domains) |
127 | 127 | { |
128 | - $orderUrl = $this->storage->getMetadata($this->basename.'.order.url'); |
|
128 | + $orderUrl = $this->storage->getMetadata($this->basename . '.order.url'); |
|
129 | 129 | $publicKey = $this->storage->getPublicKey($this->basename); |
130 | 130 | $privateKey = $this->storage->getPrivateKey($this->basename); |
131 | 131 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | //ensure retrieved order matches our domains |
172 | - $orderdomains = array_map(function ($ident) { |
|
172 | + $orderdomains = array_map(function($ident) { |
|
173 | 173 | return $ident['value']; |
174 | 174 | }, $post['body']['identifiers']); |
175 | 175 | $diff = array_merge(array_diff($orderdomains, $domains), array_diff($domains, $orderdomains)); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $this->storage->setPublicKey($this->basename, null); |
199 | 199 | $this->storage->setCertificate($this->basename, null); |
200 | 200 | $this->storage->setFullChainCertificate($this->basename, null); |
201 | - $this->storage->setMetadata($this->basename.'.order.url', null); |
|
201 | + $this->storage->setMetadata($this->basename . '.order.url', null); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | private function initialiseKeyTypeAndSize($keyType) |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | } |
267 | 267 | |
268 | 268 | $this->orderURL = trim($matches[1]); |
269 | - $this->storage->setMetadata($this->basename.'.order.url', $this->orderURL); |
|
269 | + $this->storage->setMetadata($this->basename . '.order.url', $this->orderURL); |
|
270 | 270 | |
271 | 271 | $this->generateKeys(); |
272 | 272 | |
@@ -597,13 +597,13 @@ discard block |
||
597 | 597 | */ |
598 | 598 | private function generateCSR() |
599 | 599 | { |
600 | - $domains = array_map(function ($dns) { |
|
600 | + $domains = array_map(function($dns) { |
|
601 | 601 | return $dns['value']; |
602 | 602 | }, $this->identifiers); |
603 | 603 | |
604 | 604 | $dn = ["commonName" => $this->calcCommonName($domains)]; |
605 | 605 | |
606 | - $san = implode(",", array_map(function ($dns) { |
|
606 | + $san = implode(",", array_map(function($dns) { |
|
607 | 607 | return "DNS:" . $dns; |
608 | 608 | }, $domains)); |
609 | 609 | $tmpConf = tmpfile(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | public function __construct($dir = null) |
16 | 16 | { |
17 | - $this->dir = $dir ?? getcwd().DIRECTORY_SEPARATOR.'account'; |
|
17 | + $this->dir = $dir ?? getcwd() . DIRECTORY_SEPARATOR . 'account'; |
|
18 | 18 | |
19 | 19 | if (!is_dir($this->dir)) { |
20 | 20 | /** @scrutinizer ignore-unhandled */ @mkdir($this->dir); |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | |
60 | 60 | private function getMetadataFilename($key) |
61 | 61 | { |
62 | - $key=str_replace('*', 'wildcard', $key); |
|
63 | - $file=$this->dir.DIRECTORY_SEPARATOR.$key; |
|
62 | + $key = str_replace('*', 'wildcard', $key); |
|
63 | + $file = $this->dir . DIRECTORY_SEPARATOR . $key; |
|
64 | 64 | return $file; |
65 | 65 | } |
66 | 66 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function getMetadata($key) |
70 | 70 | { |
71 | - $file=$this->getMetadataFilename($key); |
|
71 | + $file = $this->getMetadataFilename($key); |
|
72 | 72 | if (!file_exists($file)) { |
73 | 73 | return null; |
74 | 74 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function setMetadata($key, $value) |
82 | 82 | { |
83 | - $file=$this->getMetadataFilename($key); |
|
83 | + $file = $this->getMetadataFilename($key); |
|
84 | 84 | if (is_null($value)) { |
85 | 85 | //nothing to store, ensure file is removed |
86 | 86 | if (file_exists($file)) { |