@@ -98,7 +98,7 @@ |
||
98 | 98 | { |
99 | 99 | if ($this->count() !== 1) { |
100 | 100 | throw new RuntimeException(sprintf( |
101 | - __CLASS__.'::'.__METHOD__.' requires that the collection has exactly one element, ' |
|
101 | + __CLASS__ . '::' . __METHOD__ . ' requires that the collection has exactly one element, ' |
|
102 | 102 | . '"%d" elements found', |
103 | 103 | $this->count() |
104 | 104 | )); |
@@ -290,7 +290,7 @@ |
||
290 | 290 | if ($this->encryptedNameId === null) { |
291 | 291 | $this->nameId->toXML($root); |
292 | 292 | } else { |
293 | - $eid = $root->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedID'); |
|
293 | + $eid = $root->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedID'); |
|
294 | 294 | $root->appendChild($eid); |
295 | 295 | $eid->appendChild($root->ownerDocument->importNode($this->encryptedNameId, true)); |
296 | 296 | } |
@@ -36,8 +36,8 @@ |
||
36 | 36 | return sprintf( |
37 | 37 | '%s%s%s', |
38 | 38 | $this->truncateStatus($responseStatus['Code']), |
39 | - $responseStatus['SubCode'] ? '/'.$this->truncateStatus($responseStatus['SubCode']) : '', |
|
40 | - $responseStatus['Message'] ? ' '.$responseStatus['Message'] : '' |
|
39 | + $responseStatus['SubCode'] ? '/' . $this->truncateStatus($responseStatus['SubCode']) : '', |
|
40 | + $responseStatus['Message'] ? ' ' . $responseStatus['Message'] : '' |
|
41 | 41 | ); |
42 | 42 | } |
43 | 43 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $this->GeolocationHint = Utils::extractStrings($xml, Common::NS, 'GeolocationHint'); |
65 | 65 | |
66 | 66 | /** @var \DOMElement $node */ |
67 | - foreach (Utils::xpQuery($xml, "./*[namespace-uri()!='".Common::NS."']") as $node) { |
|
67 | + foreach (Utils::xpQuery($xml, "./*[namespace-uri()!='" . Common::NS . "']") as $node) { |
|
68 | 68 | $this->children[] = new Chunk($node); |
69 | 69 | } |
70 | 70 | } |
@@ -135,7 +135,7 @@ |
||
135 | 135 | if (strpos($keyword, "+") !== false) { |
136 | 136 | throw new \Exception('Keywords may not contain a "+" character.'); |
137 | 137 | } |
138 | - $value .= str_replace(' ', '+', $keyword).' '; |
|
138 | + $value .= str_replace(' ', '+', $keyword) . ' '; |
|
139 | 139 | } |
140 | 140 | $value = rtrim($value); |
141 | 141 | $e->appendChild($doc->createTextNode($value)); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | if (!$xml->hasAttribute('index')) { |
48 | - throw new \Exception('Missing index on '.$xml->tagName); |
|
48 | + throw new \Exception('Missing index on ' . $xml->tagName); |
|
49 | 49 | } |
50 | 50 | $this->index = intval($xml->getAttribute('index')); |
51 | 51 |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | private static function getStringElements(\DOMElement $parent, string $name) : array |
122 | 122 | { |
123 | - $e = Utils::xpQuery($parent, './saml_metadata:'.$name); |
|
123 | + $e = Utils::xpQuery($parent, './saml_metadata:' . $name); |
|
124 | 124 | |
125 | 125 | $ret = []; |
126 | 126 | foreach ($e as $i) { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | return null; |
147 | 147 | } |
148 | 148 | if (count($e) > 1) { |
149 | - throw new \Exception('More than one '.$name.' in '.$parent->tagName); |
|
149 | + throw new \Exception('More than one ' . $name . ' in ' . $parent->tagName); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | return $e[0]; |
@@ -108,7 +108,7 @@ |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | if (!$xml->hasAttribute('protocolSupportEnumeration')) { |
111 | - throw new \Exception('Missing protocolSupportEnumeration attribute on '.$xml->localName); |
|
111 | + throw new \Exception('Missing protocolSupportEnumeration attribute on ' . $xml->localName); |
|
112 | 112 | } |
113 | 113 | $this->protocolSupportEnumeration = preg_split('/[\s]+/', $xml->getAttribute('protocolSupportEnumeration')); |
114 | 114 |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | if (!$xml->hasAttribute('Binding')) { |
60 | - throw new \Exception('Missing Binding on '.$xml->tagName); |
|
60 | + throw new \Exception('Missing Binding on ' . $xml->tagName); |
|
61 | 61 | } |
62 | 62 | $this->Binding = $xml->getAttribute('Binding'); |
63 | 63 | |
64 | 64 | if (!$xml->hasAttribute('Location')) { |
65 | - throw new \Exception('Missing Location on '.$xml->tagName); |
|
65 | + throw new \Exception('Missing Location on ' . $xml->tagName); |
|
66 | 66 | } |
67 | 67 | $this->Location = $xml->getAttribute('Location'); |
68 | 68 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | if ($a->namespaceURI === null) { |
75 | 75 | continue; /* Not namespace-qualified -- skip. */ |
76 | 76 | } |
77 | - $fullName = '{'.$a->namespaceURI.'}'.$a->localName; |
|
77 | + $fullName = '{' . $a->namespaceURI . '}' . $a->localName; |
|
78 | 78 | $this->attributes[$fullName] = [ |
79 | 79 | 'qualifiedName' => $a->nodeName, |
80 | 80 | 'namespaceURI' => $a->namespaceURI, |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function hasAttributeNS(string $namespaceURI, string $localName) : bool |
95 | 95 | { |
96 | - $fullName = '{'.$namespaceURI.'}'.$localName; |
|
96 | + $fullName = '{' . $namespaceURI . '}' . $localName; |
|
97 | 97 | |
98 | 98 | return isset($this->attributes[$fullName]); |
99 | 99 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function getAttributeNS(string $namespaceURI, string $localName) : string |
110 | 110 | { |
111 | - $fullName = '{'.$namespaceURI.'}'.$localName; |
|
111 | + $fullName = '{' . $namespaceURI . '}' . $localName; |
|
112 | 112 | if (!isset($this->attributes[$fullName])) { |
113 | 113 | return ''; |
114 | 114 | } |
@@ -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] = [ |
139 | 139 | 'qualifiedName' => $qualifiedName, |
140 | 140 | 'namespaceURI' => $namespaceURI, |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function removeAttributeNS(string $namespaceURI, string $localName) : void |
154 | 154 | { |
155 | - $fullName = '{'.$namespaceURI.'}'.$localName; |
|
155 | + $fullName = '{' . $namespaceURI . '}' . $localName; |
|
156 | 156 | unset($this->attributes[$fullName]); |
157 | 157 | } |
158 | 158 |