@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function getPrivateKey($name, $required = false) |
| 51 | 51 | { |
| 52 | 52 | $privateKeys = $this->get('privateKeys'); |
| 53 | - $key = array_filter($privateKeys, function (PrivateKey $key) use ($name) { |
|
| 53 | + $key = array_filter($privateKeys, function(PrivateKey $key) use ($name) { |
|
| 54 | 54 | return $key->getName() === $name; |
| 55 | 55 | }); |
| 56 | 56 | |
@@ -53,8 +53,8 @@ |
||
| 53 | 53 | const CM_BEARER = 'urn:oasis:names:tc:SAML:2.0:cm:bearer'; |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * Holder-of-Key subject confirmation method. |
|
| 57 | - */ |
|
| 56 | + * Holder-of-Key subject confirmation method. |
|
| 57 | + */ |
|
| 58 | 58 | const CM_HOK = 'urn:oasis:names:tc:SAML:2.0:cm:holder-of-key'; |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 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 |
||
| 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)); |
@@ -53,7 +53,7 @@ |
||
| 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; |
@@ -59,7 +59,7 @@ |
||
| 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 | )); |
@@ -100,7 +100,7 @@ discard block |
||
| 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 |
||
| 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]; |
@@ -52,12 +52,12 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -40,7 +40,7 @@ |
||
| 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 | |
@@ -118,7 +118,7 @@ |
||
| 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 | |