@@ -56,8 +56,7 @@ |
||
56 | 56 | * We only support post right now |
57 | 57 | */ |
58 | 58 | SamlConstants::BINDING_SAML2_HTTP_POST |
59 | - )->getLocation() : |
|
60 | - $provider->getMetadataModel()->getFirstIdpSsoDescriptor()->getFirstSingleLogoutService( |
|
59 | + )->getLocation() : $provider->getMetadataModel()->getFirstIdpSsoDescriptor()->getFirstSingleLogoutService( |
|
61 | 60 | /** |
62 | 61 | * We only support post right now |
63 | 62 | */ |
@@ -70,7 +70,7 @@ |
||
70 | 70 | */ |
71 | 71 | protected function createDescriptor(string $binding) |
72 | 72 | { |
73 | - if (! in_array($binding, [ |
|
73 | + if (!in_array($binding, [ |
|
74 | 74 | SamlConstants::BINDING_SAML2_HTTP_REDIRECT, |
75 | 75 | SamlConstants::BINDING_SAML2_HTTP_POST, |
76 | 76 | ])) { |
@@ -222,7 +222,7 @@ |
||
222 | 222 | $variables['singleLogoutServices'] = null; |
223 | 223 | $variables['singleSignOnServices'] = null; |
224 | 224 | |
225 | - if (! $provider->getMetadataModel()) { |
|
225 | + if (!$provider->getMetadataModel()) { |
|
226 | 226 | return $variables; |
227 | 227 | } |
228 | 228 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $record->setMetadataModel($provider->getMetadataModel()); |
74 | 74 | |
75 | 75 | |
76 | - if (! $this->getSamlPlugin()->getProvider()->save($record)) { |
|
76 | + if (!$this->getSamlPlugin()->getProvider()->save($record)) { |
|
77 | 77 | return $this->renderTemplate( |
78 | 78 | $this->getTemplateIndex() . AbstractEditController::TEMPLATE_INDEX . DIRECTORY_SEPARATOR . 'edit', |
79 | 79 | array_merge( |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | $record = $this->processSaveAction(); |
104 | 104 | $record->metadata = Craft::$app->request->getBodyParam('metadata'); |
105 | - if (! $this->getSamlPlugin()->getProvider()->save($record)) { |
|
105 | + if (!$this->getSamlPlugin()->getProvider()->save($record)) { |
|
106 | 106 | return $this->renderTemplate( |
107 | 107 | $this->getTemplateIndex() . AbstractEditController::TEMPLATE_INDEX . DIRECTORY_SEPARATOR . 'edit', |
108 | 108 | array_merge( |
@@ -145,9 +145,9 @@ discard block |
||
145 | 145 | 'id' => $providerId, |
146 | 146 | ])->one(); |
147 | 147 | |
148 | - $record->enabled = ! $record->enabled; |
|
148 | + $record->enabled = !$record->enabled; |
|
149 | 149 | |
150 | - if (! $this->getSamlPlugin()->getProvider()->save($record)) { |
|
150 | + if (!$this->getSamlPlugin()->getProvider()->save($record)) { |
|
151 | 151 | return $this->renderTemplate( |
152 | 152 | $this->getTemplateIndex() . AbstractEditController::TEMPLATE_INDEX . DIRECTORY_SEPARATOR . 'edit', |
153 | 153 | array_merge( |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | 'id' => $providerId, |
184 | 184 | ])->one(); |
185 | 185 | |
186 | - if (! $this->getSamlPlugin()->getProvider()->delete($record)) { |
|
186 | + if (!$this->getSamlPlugin()->getProvider()->delete($record)) { |
|
187 | 187 | return $this->renderTemplate( |
188 | 188 | $this->getTemplateIndex() . AbstractEditController::TEMPLATE_INDEX . DIRECTORY_SEPARATOR . 'edit', |
189 | 189 | array_merge( |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $this->requireAdmin(); |
253 | 253 | |
254 | 254 | /** @var KeyChainRecord $keychain */ |
255 | - if (! $keychain = KeyChainRecord::find()->where([ |
|
255 | + if (!$keychain = KeyChainRecord::find()->where([ |
|
256 | 256 | 'id' => $keyId, |
257 | 257 | ])->one()) { |
258 | 258 | throw new NotFoundHttpException('Key not found'); |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * We only support post right now |
57 | 57 | */ |
58 | 58 | SamlConstants::BINDING_SAML2_HTTP_POST |
59 | - )->getLocation() : |
|
60 | - $provider->getMetadataModel()->getFirstIdpSsoDescriptor()->getFirstSingleLogoutService( |
|
59 | + )->getLocation() : $provider->getMetadataModel()->getFirstIdpSsoDescriptor()->getFirstSingleLogoutService( |
|
61 | 60 | /** |
62 | 61 | * We only support post right now |
63 | 62 | */ |
@@ -28,10 +28,10 @@ |
||
28 | 28 | */ |
29 | 29 | public function getUser() |
30 | 30 | { |
31 | - if(! $this->userId) { |
|
31 | + if (!$this->userId) { |
|
32 | 32 | return null; |
33 | 33 | } |
34 | - if (! $this->user) { |
|
34 | + if (!$this->user) { |
|
35 | 35 | $this->user = \Craft::$app->getUsers()->getUserById( |
36 | 36 | $this->userId |
37 | 37 | ); |