Passed
Branch master (5ed211)
by Damien
26:13 queued 11:02
created
src/controllers/cp/view/metadata/AbstractEditController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/controllers/AbstractMetadataController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/services/messages/AbstractLogoutResponse.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
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
                  */
Please login to merge, or discard this patch.
src/records/AbstractProviderIdentity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
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
             );
Please login to merge, or discard this patch.
src/records/AbstractProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function beforeSave($insert)
37 37
     {
38
-        if (! $this->entityId) {
38
+        if (!$this->entityId) {
39 39
             $this->entityId = $this->getEntityId();
40 40
         }
41 41
 
42 42
         /**
43 43
          * Remove the signature if it exists.
44 44
          */
45
-        if($this->getMetadataModel()->getSignature()) {
45
+        if ($this->getMetadataModel()->getSignature()) {
46 46
             $this->removeSignature();
47 47
         }
48 48
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     protected function removeSignature()
65 65
     {
66
-        if($this->getMetadataModel()->getSignature()) {
66
+        if ($this->getMetadataModel()->getSignature()) {
67 67
             $doc = new \DOMDocument('1.0', 'UTF-8');
68 68
             $doc->loadXML($this->metadata);
69 69
             $doc->documentElement->removeChild(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function getMetadataModel(): EntityDescriptor
91 91
     {
92
-        if (! $this->metadataModel) {
92
+        if (!$this->metadataModel) {
93 93
             $this->metadataModel = EntityDescriptor::loadXml($this->metadata);
94 94
         }
95 95
 
Please login to merge, or discard this patch.
src/services/messages/AbstractLogoutRequest.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
         $logout->setDestination(
53 53
             $provider->getType() === AbstractPlugin::SP ?
54 54
                 $provider->getMetadataModel()->getFirstSpSsoDescriptor()->getFirstSingleLogoutService(
55
-                )->getLocation() :
56
-                $provider->getMetadataModel()->getFirstIdpSsoDescriptor()->getFirstSingleLogoutService(
55
+                )->getLocation() : $provider->getMetadataModel()->getFirstIdpSsoDescriptor()->getFirstSingleLogoutService(
57 56
                 )->getLocation()
58 57
         );
59 58
         /**
Please login to merge, or discard this patch.