@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function save(KeyChainRecord $keyChainRecord, $runValidation = true, $attributeNames = null) |
37 | 37 | { |
38 | - if (! $runValidation && $keyChainRecord->validate()) { |
|
38 | + if (!$runValidation && $keyChainRecord->validate()) { |
|
39 | 39 | return false; |
40 | 40 | } |
41 | 41 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function decrypt(KeyChainRecord $record) |
70 | 70 | { |
71 | 71 | |
72 | - if ($record->isEncrypted && ! $record->isDecrypted) { |
|
72 | + if ($record->isEncrypted && !$record->isDecrypted) { |
|
73 | 73 | $record->decryptedKey = \Craft::$app->getSecurity()->decryptByKey( |
74 | 74 | base64_decode($record->key), |
75 | 75 | \Craft::$app->getConfig()->getGeneral()->securityKey |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $keyPairRecord->isDecrypted = true; |
77 | 77 | |
78 | 78 | |
79 | - if (! KeyChain::getInstance()->getService()->save($keyPairRecord)) { |
|
79 | + if (!KeyChain::getInstance()->getService()->save($keyPairRecord)) { |
|
80 | 80 | $this->stderr( |
81 | 81 | sprintf('Failed to save new key pair to the database') . PHP_EOL |
82 | 82 | , Console::FG_RED); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function isKeyCertAPair($attribute, $params, $validator) |
65 | 65 | { |
66 | - if (! openssl_x509_check_private_key($this->getDecryptedCertificate(), $this->getDecryptedKey())) { |
|
66 | + if (!openssl_x509_check_private_key($this->getDecryptedCertificate(), $this->getDecryptedKey())) { |
|
67 | 67 | $this->addError($attribute, 'Key and certificate are not a pair.'); |
68 | 68 | } |
69 | 69 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function getDecryptedKey() |
88 | 88 | { |
89 | - if (! $this->decryptedKey) { |
|
89 | + if (!$this->decryptedKey) { |
|
90 | 90 | KeyChain::getInstance()->getService()->decrypt($this); |
91 | 91 | $this->isDecrypted = true; |
92 | 92 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function getDecryptedCertificate() |
102 | 102 | { |
103 | - if (! $this->decryptedCertificate) { |
|
103 | + if (!$this->decryptedCertificate) { |
|
104 | 104 | KeyChain::getInstance()->getService()->decrypt($this); |
105 | 105 | } |
106 | 106 |
@@ -152,7 +152,7 @@ |
||
152 | 152 | 'id' => $keypairId, |
153 | 153 | ])->one(); |
154 | 154 | |
155 | - $keychainRecord->enabled = ! $keychainRecord->enabled; |
|
155 | + $keychainRecord->enabled = !$keychainRecord->enabled; |
|
156 | 156 | |
157 | 157 | if (KeyChain::getInstance()->getService()->save($keychainRecord)) { |
158 | 158 | Craft::$app->getSession()->setNotice(Craft::t('keychain', 'Key pair saved.')); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | ]; |
38 | 38 | |
39 | 39 | |
40 | - if (! ($this->getPlugin() instanceof KeyChain)) { |
|
40 | + if (!($this->getPlugin() instanceof KeyChain)) { |
|
41 | 41 | $variables['crumbs'][] = [ |
42 | 42 | 'url' => UrlHelper::cpUrl($this->getPlugin()->getUniqueId()), |
43 | 43 | 'label' => $this->getPlugin()->name, |