Completed
Push — master ( 746563...99649c )
by Thijs
07:14
created
src/SAML2/HTTPArtifact.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         }
36 36
 
37 37
         $generatedId = pack('H*', ((string) SimpleSAML_Utilities::stringToHex(SimpleSAML_Utilities::generateRandomBytes(20))));
38
-        $artifact = base64_encode("\x00\x04\x00\x00" . sha1($message->getIssuer(), true) . $generatedId) ;
38
+        $artifact = base64_encode("\x00\x04\x00\x00".sha1($message->getIssuer(), true).$generatedId);
39 39
         $artifactData = $message->toUnsignedXML();
40 40
         $artifactDataString = $artifactData->ownerDocument->saveXML($artifactData);
41 41
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         if (array_key_exists('SAMLart', $_REQUEST)) {
79 79
             $artifact = base64_decode($_REQUEST['SAMLart']);
80
-            $endpointIndex =  bin2hex(substr($artifact, 2, 2));
80
+            $endpointIndex = bin2hex(substr($artifact, 2, 2));
81 81
             $sourceId = bin2hex(substr($artifact, 4, 20));
82 82
         } else {
83 83
             throw new \Exception('Missing SAMLArt parameter.');
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
         $idpMetadata = $metadataHandler->getMetaDataConfigForSha1($sourceId, 'saml20-idp-remote');
89 89
 
90 90
         if ($idpMetadata === null) {
91
-            throw new \Exception('No metadata found for remote provider with SHA1 ID: ' . var_export($sourceId, true));
91
+            throw new \Exception('No metadata found for remote provider with SHA1 ID: '.var_export($sourceId, true));
92 92
         }
93 93
 
94 94
         $endpoint = null;
95 95
         foreach ($idpMetadata->getEndpoints('ArtifactResolutionService') as $ep) {
96
-            if ($ep['index'] ===  hexdec($endpointIndex)) {
96
+            if ($ep['index'] === hexdec($endpointIndex)) {
97 97
                 $endpoint = $ep;
98 98
                 break;
99 99
             }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             throw new \Exception('No ArtifactResolutionService with the correct index.');
104 104
         }
105 105
 
106
-        Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := " . $endpoint['Location']);
106
+        Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := ".$endpoint['Location']);
107 107
 
108 108
         //Construct the ArtifactResolve Request
109 109
         $ar = new ArtifactResolve();
Please login to merge, or discard this patch.
src/SAML2/LogoutRequest.php 1 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
             Utils::addNameId($root, $this->nameId);
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/SOAPClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
             $privateKey = SimpleSAML_Utilities::loadPrivateKey($srcMetadata);
52 52
             $publicKey = SimpleSAML_Utilities::loadPublicKey($srcMetadata);
53 53
             if ($privateKey !== null && $publicKey !== null && isset($publicKey['PEM'])) {
54
-                $keyCertData = $privateKey['PEM'] . $publicKey['PEM'];
55
-                $file = SimpleSAML_Utilities::getTempDir() . '/' . sha1($keyCertData) . '.pem';
54
+                $keyCertData = $privateKey['PEM'].$publicKey['PEM'];
55
+                $file = SimpleSAML_Utilities::getTempDir().'/'.sha1($keyCertData).'.pem';
56 56
                 if (!file_exists($file)) {
57 57
                     SimpleSAML_Utilities::writeFile($file, $keyCertData);
58 58
                 }
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
                 if ($key['type'] !== 'X509Certificate') {
72 72
                     continue;
73 73
                 }
74
-                $certData .= "-----BEGIN CERTIFICATE-----\n" .
75
-                    chunk_split($key['X509Certificate'], 64) .
74
+                $certData .= "-----BEGIN CERTIFICATE-----\n".
75
+                    chunk_split($key['X509Certificate'], 64).
76 76
                     "-----END CERTIFICATE-----\n";
77 77
             }
78
-            $peerCertFile = SimpleSAML_Utilities::getTempDir() . '/' . sha1($certData) . '.pem';
78
+            $peerCertFile = SimpleSAML_Utilities::getTempDir().'/'.sha1($certData).'.pem';
79 79
             if (!file_exists($peerCertFile)) {
80 80
                 SimpleSAML_Utilities::writeFile($peerCertFile, $certData);
81 81
             }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         // Add soap-envelopes
102 102
         $request = $msg->toSignedXML();
103
-        $request = self::START_SOAP_ENVELOPE . $request->ownerDocument->saveXML($request) . self::END_SOAP_ENVELOPE;
103
+        $request = self::START_SOAP_ENVELOPE.$request->ownerDocument->saveXML($request).self::END_SOAP_ENVELOPE;
104 104
 
105 105
         Utils::getContainer()->debugMessage($request, 'out');
106 106
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         // There is a fault element but we haven't found out what the fault string is
226 226
         $soapFaultString = "Unknown fault string found";
227 227
         // find out the fault string
228
-        $faultStringElement =   Utils::xpQuery($soapFaultElement, './soap-env:faultstring') ;
228
+        $faultStringElement = Utils::xpQuery($soapFaultElement, './soap-env:faultstring');
229 229
         if (!empty($faultStringElement)) {
230 230
             return $faultStringElement[0]->textContent;
231 231
         }
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/ContactPerson.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         assert('is_string($name)');
102 102
 
103
-        $e = Utils::xpQuery($parent, './saml_metadata:' . $name);
103
+        $e = Utils::xpQuery($parent, './saml_metadata:'.$name);
104 104
 
105 105
         $ret = array();
106 106
         foreach ($e as $i) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             return null;
128 128
         }
129 129
         if (count($e) > 1) {
130
-            throw new \Exception('More than one ' . $name . ' in ' . $parent->tagName);
130
+            throw new \Exception('More than one '.$name.' in '.$parent->tagName);
131 131
         }
132 132
 
133 133
         return $e[0];
Please login to merge, or discard this patch.
src/SAML2/XML/md/EndpointType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         if (!$xml->hasAttribute('Binding')) {
55
-            throw new \Exception('Missing Binding on ' . $xml->tagName);
55
+            throw new \Exception('Missing Binding on '.$xml->tagName);
56 56
         }
57 57
         $this->Binding = $xml->getAttribute('Binding');
58 58
 
59 59
         if (!$xml->hasAttribute('Location')) {
60
-            throw new \Exception('Missing Location on ' . $xml->tagName);
60
+            throw new \Exception('Missing Location on '.$xml->tagName);
61 61
         }
62 62
         $this->Location = $xml->getAttribute('Location');
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             if ($a->namespaceURI === null) {
70 70
                 continue; /* Not namespace-qualified -- skip. */
71 71
             }
72
-            $fullName = '{' . $a->namespaceURI . '}' . $a->localName;
72
+            $fullName = '{'.$a->namespaceURI.'}'.$a->localName;
73 73
             $this->attributes[$fullName] = array(
74 74
                 'qualifiedName' => $a->nodeName,
75 75
                 'namespaceURI' => $a->namespaceURI,
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         assert('is_string($namespaceURI)');
91 91
         assert('is_string($localName)');
92 92
 
93
-        $fullName = '{' . $namespaceURI . '}' . $localName;
93
+        $fullName = '{'.$namespaceURI.'}'.$localName;
94 94
 
95 95
         return isset($this->attributes[$fullName]);
96 96
     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         assert('is_string($namespaceURI)');
108 108
         assert('is_string($localName)');
109 109
 
110
-        $fullName = '{' . $namespaceURI . '}' . $localName;
110
+        $fullName = '{'.$namespaceURI.'}'.$localName;
111 111
         if (!isset($this->attributes[$fullName])) {
112 112
             return '';
113 113
         }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         }
135 135
         $localName = $name[1];
136 136
 
137
-        $fullName = '{' . $namespaceURI . '}' . $localName;
137
+        $fullName = '{'.$namespaceURI.'}'.$localName;
138 138
         $this->attributes[$fullName] = array(
139 139
             'qualifiedName' => $qualifiedName,
140 140
             'namespaceURI' => $namespaceURI,
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         assert('is_string($namespaceURI)');
154 154
         assert('is_string($localName)');
155 155
 
156
-        $fullName = '{' . $namespaceURI . '}' . $localName;
156
+        $fullName = '{'.$namespaceURI.'}'.$localName;
157 157
         unset($this->attributes[$fullName]);
158 158
     }
159 159
 
Please login to merge, or discard this patch.
src/SAML2/XML/md/IndexedEndpointType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         }
41 41
 
42 42
         if (!$xml->hasAttribute('index')) {
43
-            throw new \Exception('Missing index on ' . $xml->tagName);
43
+            throw new \Exception('Missing index on '.$xml->tagName);
44 44
         }
45 45
         $this->index = (int) $xml->getAttribute('index');
46 46
 
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.