Completed
Branch release-4-alpha (2ab080)
by Tim
02:00
created
src/SAML2/Response/Validation/ConstraintValidator/IsSuccessful.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@
 block discarded – undo
22 22
         return sprintf(
23 23
             '%s%s%s',
24 24
             $this->truncateStatus($responseStatus['Code']),
25
-            $responseStatus['SubCode'] ? '/' . $this->truncateStatus($responseStatus['SubCode']) : '',
26
-            $responseStatus['Message'] ? ' ' . $responseStatus['Message'] : ''
25
+            $responseStatus['SubCode'] ? '/'.$this->truncateStatus($responseStatus['SubCode']) : '',
26
+            $responseStatus['Message'] ? ' '.$responseStatus['Message'] : ''
27 27
         );
28 28
     }
29 29
 
Please login to merge, or discard this patch.
src/SAML2/LogoutRequest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     /**
108 108
      * Check whether the NameId is encrypted.
109 109
      *
110
-     * @return true if the NameId is encrypted, false if not.
110
+     * @return boolean if the NameId is encrypted, false if not.
111 111
      */
112 112
     public function isNameIdEncrypted()
113 113
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
         if ($this->encryptedNameId === null) {
265 265
             $this->nameId->toXML($root);
266 266
         } else {
267
-            $eid = $root->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedID');
267
+            $eid = $root->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedID');
268 268
             $root->appendChild($eid);
269 269
             $eid->appendChild($root->ownerDocument->importNode($this->encryptedNameId, true));
270 270
         }
Please login to merge, or discard this patch.
src/SAML2/Response/Processor.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param \SAML2\Configuration\Destination      $currentDestination
65 65
      * @param \SAML2\Response                       $response
66 66
      *
67
-     * @return \SAML2\Assertion[] Collection (\SAML2\Utilities\ArrayCollection) of \SAML2\Assertion objects
67
+     * @return \SAML2\Utilities\ArrayCollection Collection (\SAML2\Utilities\ArrayCollection) of \SAML2\Assertion objects
68 68
      */
69 69
     public function process(
70 70
         ServiceProvider $serviceProviderConfiguration,
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     /**
135 135
      * @param \SAML2\Response $response
136 136
      *
137
-     * @return \SAML2\Assertion[]
137
+     * @return \SAML2\Utilities\ArrayCollection
138 138
      */
139 139
     private function processAssertions(Response $response)
140 140
     {
Please login to merge, or discard this patch.
src/SAML2/EncryptedAssertion.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 break;
76 76
 
77 77
             default:
78
-                throw new \Exception('Unknown key type for encryption: ' . $key->type);
78
+                throw new \Exception('Unknown key type for encryption: '.$key->type);
79 79
         }
80 80
 
81 81
         $this->encryptedData = $enc->encryptNode($symmetricKey);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             $document = $parentElement->ownerDocument;
113 113
         }
114 114
 
115
-        $root = $document->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedAssertion');
115
+        $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedAssertion');
116 116
         $parentElement->appendChild($root);
117 117
 
118 118
         $root->appendChild($document->importNode($this->encryptedData, true));
Please login to merge, or discard this patch.
src/SAML2/Signature/PublicKeyValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         CertificateProvider $configuration
54 54
     ) {
55 55
         $logger = $this->logger;
56
-        $pemCandidates = $this->configuredKeys->filter(function (Key $key) use ($logger) {
56
+        $pemCandidates = $this->configuredKeys->filter(function(Key $key) use ($logger) {
57 57
             if (!$key instanceof X509) {
58 58
                 $logger->debug(sprintf('Skipping unknown key type: "%s"', $key['type']));
59 59
                 return false;
Please login to merge, or discard this patch.
src/SAML2/Utilities/ArrayCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     {
60 60
         if ($this->count() !== 1) {
61 61
             throw new RuntimeException(sprintf(
62
-                __CLASS__ . '::' . __METHOD__ . ' requires that the collection has exactly one element, '
62
+                __CLASS__.'::'.__METHOD__.' requires that the collection has exactly one element, '
63 63
                 . '"%d" elements found',
64 64
                 $this->count()
65 65
             ));
Please login to merge, or discard this patch.
src/SAML2/XML/md/RoleDescriptor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         }
119 119
 
120 120
         if (!$xml->hasAttribute('protocolSupportEnumeration')) {
121
-            throw new \Exception('Missing protocolSupportEnumeration attribute on ' . $xml->localName);
121
+            throw new \Exception('Missing protocolSupportEnumeration attribute on '.$xml->localName);
122 122
         }
123 123
         $this->protocolSupportEnumeration = preg_split('/[\s]+/', $xml->getAttribute('protocolSupportEnumeration'));
124 124
 
Please login to merge, or discard this patch.
src/SAML2/HTTPRedirect.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -49,21 +49,21 @@  discard block
 block discarded – undo
49 49
         $msg .= urlencode($msgStr);
50 50
 
51 51
         if ($relayState !== null) {
52
-            $msg .= '&RelayState=' . urlencode($relayState);
52
+            $msg .= '&RelayState='.urlencode($relayState);
53 53
         }
54 54
 
55 55
         if ($key !== null) {
56 56
             /* Add the signature. */
57
-            $msg .= '&SigAlg=' . urlencode($key->type);
57
+            $msg .= '&SigAlg='.urlencode($key->type);
58 58
 
59 59
             $signature = $key->signData($msg);
60
-            $msg .= '&Signature=' . urlencode(base64_encode($signature));
60
+            $msg .= '&Signature='.urlencode(base64_encode($signature));
61 61
         }
62 62
 
63 63
         if (strpos($destination, '?') === false) {
64
-            $destination .= '?' . $msg;
64
+            $destination .= '?'.$msg;
65 65
         } else {
66
-            $destination .= '&' . $msg;
66
+            $destination .= '&'.$msg;
67 67
         }
68 68
 
69 69
         return $destination;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function send(Message $message)
80 80
     {
81 81
         $destination = $this->getRedirectURL($message);
82
-        Utils::getContainer()->getLogger()->debug('Redirect to ' . strlen($destination) . ' byte URL: ' . $destination);
82
+        Utils::getContainer()->getLogger()->debug('Redirect to '.strlen($destination).' byte URL: '.$destination);
83 83
         Utils::getContainer()->redirect($destination);
84 84
     }
85 85
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         }
107 107
 
108 108
         if (isset($data['SAMLEncoding']) && $data['SAMLEncoding'] !== self::DEFLATE) {
109
-            throw new \Exception('Unknown SAMLEncoding: ' . var_export($data['SAMLEncoding'], true));
109
+            throw new \Exception('Unknown SAMLEncoding: '.var_export($data['SAMLEncoding'], true));
110 110
         }
111 111
 
112 112
         $message = base64_decode($message);
@@ -182,18 +182,18 @@  discard block
 block discarded – undo
182 182
             switch ($name) {
183 183
                 case 'SAMLRequest':
184 184
                 case 'SAMLResponse':
185
-                    $sigQuery = $name . '=' . $value;
185
+                    $sigQuery = $name.'='.$value;
186 186
                     break;
187 187
                 case 'RelayState':
188
-                    $relayState = '&RelayState=' . $value;
188
+                    $relayState = '&RelayState='.$value;
189 189
                     break;
190 190
                 case 'SigAlg':
191
-                    $sigAlg = '&SigAlg=' . $value;
191
+                    $sigAlg = '&SigAlg='.$value;
192 192
                     break;
193 193
             }
194 194
         }
195 195
 
196
-        $data['SignedQuery'] = $sigQuery . $relayState . $sigAlg;
196
+        $data['SignedQuery'] = $sigQuery.$relayState.$sigAlg;
197 197
 
198 198
         return $data;
199 199
     }
Please login to merge, or discard this patch.
src/SAML2/Assertion.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
     /**
695 695
      * Check whether the NameId is encrypted.
696 696
      *
697
-     * @return true if the NameId is encrypted, false if not.
697
+     * @return boolean if the NameId is encrypted, false if not.
698 698
      */
699 699
     public function isNameIdEncrypted()
700 700
     {
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
      *
1097 1097
      * The URI reference MAY directly resolve into an XML document containing the referenced declaration.
1098 1098
      *
1099
-     * @return string
1099
+     * @return Chunk
1100 1100
      */
1101 1101
     public function getAuthnContextDeclRef()
1102 1102
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
         if ($xml->getAttribute('Version') !== '2.0') {
284 284
             /* Currently a very strict check. */
285
-            throw new \Exception('Unsupported version: ' . $xml->getAttribute('Version'));
285
+            throw new \Exception('Unsupported version: '.$xml->getAttribute('Version'));
286 286
         }
287 287
 
288 288
         $this->issueInstant = Utils::xsDateTimeToTimestamp($xml->getAttribute('IssueInstant'));
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
                 continue;
385 385
             }
386 386
             if ($node->namespaceURI !== Constants::NS_SAML) {
387
-                throw new \Exception('Unknown namespace of condition: ' . var_export($node->namespaceURI, true));
387
+                throw new \Exception('Unknown namespace of condition: '.var_export($node->namespaceURI, true));
388 388
             }
389 389
             switch ($node->localName) {
390 390
                 case 'AudienceRestriction':
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
                     /* Currently ignored. */
408 408
                     break;
409 409
                 default:
410
-                    throw new \Exception('Unknown condition: ' . var_export($node->localName, true));
410
+                    throw new \Exception('Unknown condition: '.var_export($node->localName, true));
411 411
             }
412 412
         }
413 413
     }
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
             $document = $parentElement->ownerDocument;
1306 1306
         }
1307 1307
 
1308
-        $root = $document->createElementNS(Constants::NS_SAML, 'saml:' . 'Assertion');
1308
+        $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'Assertion');
1309 1309
         $parentElement->appendChild($root);
1310 1310
 
1311 1311
         /* Ugly hack to add another namespace declaration to the root element. */
@@ -1361,7 +1361,7 @@  discard block
 block discarded – undo
1361 1361
         if ($this->encryptedNameId === null) {
1362 1362
             $this->nameId->toXML($subject);
1363 1363
         } else {
1364
-            $eid = $subject->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedID');
1364
+            $eid = $subject->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedID');
1365 1365
             $subject->appendChild($eid);
1366 1366
             $eid->appendChild($subject->ownerDocument->importNode($this->encryptedNameId, true));
1367 1367
         }
@@ -1513,7 +1513,7 @@  discard block
 block discarded – undo
1513 1513
             if (is_array($this->attributesValueTypes) && array_key_exists($name, $this->attributesValueTypes)) {
1514 1514
                 $valueTypes = $this->attributesValueTypes[$name];
1515 1515
                 if (is_array($valueTypes) && count($valueTypes) != count($values)) {
1516
-                    throw new \Exception('Array of value types and array of values have different size for attribute '. var_export($name, true));
1516
+                    throw new \Exception('Array of value types and array of values have different size for attribute '.var_export($name, true));
1517 1517
                 }
1518 1518
             } else {
1519 1519
                 // if no type(s), default behaviour
Please login to merge, or discard this patch.