@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | break; |
| 97 | 97 | |
| 98 | 98 | default: |
| 99 | - throw new \Exception('Unknown key type for encryption: '.$key->type); |
|
| 99 | + throw new \Exception('Unknown key type for encryption: ' . $key->type); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $document = $parentElement->ownerDocument; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedAssertion'); |
|
| 142 | + $root = $document->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedAssertion'); |
|
| 143 | 143 | $parentElement->appendChild($root); |
| 144 | 144 | |
| 145 | 145 | $root->appendChild($document->importNode($this->encryptedData, true)); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function emergency($message, array $context = []) : void |
| 25 | 25 | { |
| 26 | 26 | /** @psalm-suppress UndefinedClass */ |
| 27 | - SspLogger::emergency($message.($context ? " ".var_export($context, true) : "")); |
|
| 27 | + SspLogger::emergency($message . ($context ? " " . var_export($context, true) : "")); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function alert($message, array $context = []) : void |
| 44 | 44 | { |
| 45 | 45 | /** @psalm-suppress UndefinedClass */ |
| 46 | - SspLogger::alert($message.($context ? " ".var_export($context, true) : "")); |
|
| 46 | + SspLogger::alert($message . ($context ? " " . var_export($context, true) : "")); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | public function critical($message, array $context = []) : void |
| 62 | 62 | { |
| 63 | 63 | /** @psalm-suppress UndefinedClass */ |
| 64 | - SspLogger::critical($message.($context ? " ".var_export($context, true) : "")); |
|
| 64 | + SspLogger::critical($message . ($context ? " " . var_export($context, true) : "")); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | public function error($message, array $context = []) : void |
| 79 | 79 | { |
| 80 | 80 | /** @psalm-suppress UndefinedClass */ |
| 81 | - SspLogger::error($message.($context ? " ".var_export($context, true) : "")); |
|
| 81 | + SspLogger::error($message . ($context ? " " . var_export($context, true) : "")); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | public function warning($message, array $context = []) : void |
| 98 | 98 | { |
| 99 | 99 | /** @psalm-suppress UndefinedClass */ |
| 100 | - SspLogger::warning($message.($context ? " ".var_export($context, true) : "")); |
|
| 100 | + SspLogger::warning($message . ($context ? " " . var_export($context, true) : "")); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | public function notice($message, array $context = []) : void |
| 114 | 114 | { |
| 115 | 115 | /** @psalm-suppress UndefinedClass */ |
| 116 | - SspLogger::notice($message.($context ? " ".var_export($context, true) : "")); |
|
| 116 | + SspLogger::notice($message . ($context ? " " . var_export($context, true) : "")); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | public function info($message, array $context = []) : void |
| 132 | 132 | { |
| 133 | 133 | /** @psalm-suppress UndefinedClass */ |
| 134 | - SspLogger::info($message.($context ? " ".var_export($context, true) : "")); |
|
| 134 | + SspLogger::info($message . ($context ? " " . var_export($context, true) : "")); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | public function debug($message, array $context = []) : void |
| 148 | 148 | { |
| 149 | 149 | /** @psalm-suppress UndefinedClass */ |
| 150 | - SspLogger::debug($message.($context ? " ".var_export($context, true) : "")); |
|
| 150 | + SspLogger::debug($message . ($context ? " " . var_export($context, true) : "")); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | |
| 270 | 270 | if ($xml->getAttribute('Version') !== '2.0') { |
| 271 | 271 | /* Currently a very strict check. */ |
| 272 | - throw new \Exception('Unsupported version: '.$xml->getAttribute('Version')); |
|
| 272 | + throw new \Exception('Unsupported version: ' . $xml->getAttribute('Version')); |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | $this->issueInstant = Utils::xsDateTimeToTimestamp($xml->getAttribute('IssueInstant')); |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | continue; |
| 379 | 379 | } |
| 380 | 380 | if ($node->namespaceURI !== Constants::NS_SAML) { |
| 381 | - throw new \Exception('Unknown namespace of condition: '.var_export($node->namespaceURI, true)); |
|
| 381 | + throw new \Exception('Unknown namespace of condition: ' . var_export($node->namespaceURI, true)); |
|
| 382 | 382 | } |
| 383 | 383 | switch ($node->localName) { |
| 384 | 384 | case 'AudienceRestriction': |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | /* Currently ignored. */ |
| 402 | 402 | break; |
| 403 | 403 | default: |
| 404 | - throw new \Exception('Unknown condition: '.var_export($node->localName, true)); |
|
| 404 | + throw new \Exception('Unknown condition: ' . var_export($node->localName, true)); |
|
| 405 | 405 | } |
| 406 | 406 | } |
| 407 | 407 | } |
@@ -1473,7 +1473,7 @@ discard block |
||
| 1473 | 1473 | $document = $parentElement->ownerDocument; |
| 1474 | 1474 | } |
| 1475 | 1475 | |
| 1476 | - $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'Assertion'); |
|
| 1476 | + $root = $document->createElementNS(Constants::NS_SAML, 'saml:' . 'Assertion'); |
|
| 1477 | 1477 | $parentElement->appendChild($root); |
| 1478 | 1478 | |
| 1479 | 1479 | /* Ugly hack to add another namespace declaration to the root element. */ |
@@ -1527,7 +1527,7 @@ discard block |
||
| 1527 | 1527 | if ($this->encryptedNameId === null) { |
| 1528 | 1528 | $this->nameId->toXML($subject); |
| 1529 | 1529 | } else { |
| 1530 | - $eid = $subject->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedID'); |
|
| 1530 | + $eid = $subject->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedID'); |
|
| 1531 | 1531 | $subject->appendChild($eid); |
| 1532 | 1532 | $eid->appendChild($subject->ownerDocument->importNode($this->encryptedNameId, true)); |
| 1533 | 1533 | } |
@@ -1687,7 +1687,7 @@ discard block |
||
| 1687 | 1687 | if (array_key_exists($name, $this->attributesValueTypes)) { |
| 1688 | 1688 | $valueTypes = $this->attributesValueTypes[$name]; |
| 1689 | 1689 | if (is_array($valueTypes) && count($valueTypes) != count($values)) { |
| 1690 | - throw new \Exception('Array of value types and array of values have different size for attribute '. |
|
| 1690 | + throw new \Exception('Array of value types and array of values have different size for attribute ' . |
|
| 1691 | 1691 | var_export($name, true)); |
| 1692 | 1692 | } |
| 1693 | 1693 | } else { |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | $privateKey = Crypto::loadPrivateKey($srcMetadata); |
| 67 | 67 | $publicKey = Crypto::loadPublicKey($srcMetadata); |
| 68 | 68 | if ($privateKey !== null && $publicKey !== null && isset($publicKey['PEM'])) { |
| 69 | - $keyCertData = $privateKey['PEM'].$publicKey['PEM']; |
|
| 70 | - $file = $container->getTempDir().'/'.sha1($keyCertData).'.pem'; |
|
| 69 | + $keyCertData = $privateKey['PEM'] . $publicKey['PEM']; |
|
| 70 | + $file = $container->getTempDir() . '/' . sha1($keyCertData) . '.pem'; |
|
| 71 | 71 | if (!file_exists($file)) { |
| 72 | 72 | $container->writeFile($file, $keyCertData); |
| 73 | 73 | } |
@@ -86,11 +86,11 @@ discard block |
||
| 86 | 86 | if ($key['type'] !== 'X509Certificate') { |
| 87 | 87 | continue; |
| 88 | 88 | } |
| 89 | - $certData .= "-----BEGIN CERTIFICATE-----\n". |
|
| 90 | - chunk_split($key['X509Certificate'], 64). |
|
| 89 | + $certData .= "-----BEGIN CERTIFICATE-----\n" . |
|
| 90 | + chunk_split($key['X509Certificate'], 64) . |
|
| 91 | 91 | "-----END CERTIFICATE-----\n"; |
| 92 | 92 | } |
| 93 | - $peerCertFile = $container->getTempDir().'/'.sha1($certData).'.pem'; |
|
| 93 | + $peerCertFile = $container->getTempDir() . '/' . sha1($certData) . '.pem'; |
|
| 94 | 94 | if (!file_exists($peerCertFile)) { |
| 95 | 95 | $container->writeFile($peerCertFile, $certData); |
| 96 | 96 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | // Add soap-envelopes |
| 126 | 126 | $request = $msg->toSignedXML(); |
| 127 | - $request = self::START_SOAP_ENVELOPE.$request->ownerDocument->saveXML($request).self::END_SOAP_ENVELOPE; |
|
| 127 | + $request = self::START_SOAP_ENVELOPE . $request->ownerDocument->saveXML($request) . self::END_SOAP_ENVELOPE; |
|
| 128 | 128 | |
| 129 | 129 | $container->debugMessage($request, 'out'); |
| 130 | 130 | |
@@ -26,10 +26,10 @@ |
||
| 26 | 26 | $className = $renamed[$className]; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - $file = dirname(__FILE__).'/'.str_replace('_', '/', $className).'.php'; |
|
| 29 | + $file = dirname(__FILE__) . '/' . str_replace('_', '/', $className) . '.php'; |
|
| 30 | 30 | if (file_exists($file)) { |
| 31 | 31 | require_once($file); |
| 32 | - $newName = '\\'.str_replace('_', '\\', $className); |
|
| 32 | + $newName = '\\' . str_replace('_', '\\', $className); |
|
| 33 | 33 | class_alias($newName, $oldName); |
| 34 | 34 | } |
| 35 | 35 | } |