@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | class Signer |
34 | 34 | { |
35 | - const CANONICAL = [true,false,null,null]; |
|
35 | + const CANONICAL = [true, false, null, null]; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Make Signature tag |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if (empty($content)) { |
57 | 57 | throw SignerException::isNotXml(); |
58 | 58 | } |
59 | - if (! Validator::isXML($content)) { |
|
59 | + if (!Validator::isXML($content)) { |
|
60 | 60 | throw SignerException::isNotXml(); |
61 | 61 | } |
62 | 62 | $dom = new DOMDocument('1.0', 'UTF-8'); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | if (empty($node)) { |
68 | 68 | throw SignerException::tagNotFound($tagname); |
69 | 69 | } |
70 | - if (! self::existsSignature($content)) { |
|
70 | + if (!self::existsSignature($content)) { |
|
71 | 71 | $dom = self::createSignature( |
72 | 72 | $certificate, |
73 | 73 | $dom, |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $nsSignatureMethod = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'; |
110 | 110 | $nsDigestMethod = 'http://www.w3.org/2001/04/xmlenc#sha256'; |
111 | 111 | } |
112 | - $nsTransformMethod1 ='http://www.w3.org/2000/09/xmldsig#enveloped-signature'; |
|
112 | + $nsTransformMethod1 = 'http://www.w3.org/2000/09/xmldsig#enveloped-signature'; |
|
113 | 113 | $nsTransformMethod2 = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315'; |
114 | 114 | $idSigned = trim($node->getAttribute($mark)); |
115 | 115 | $signatureNode = $dom->createElementNS($nsDSIG, 'Signature'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public static function removeSignature($content) |
166 | 166 | { |
167 | - if (! self::existsSignature($content)) { |
|
167 | + if (!self::existsSignature($content)) { |
|
168 | 168 | return $content; |
169 | 169 | } |
170 | 170 | $dom = new \DOMDocument('1.0', 'utf-8'); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | */ |
211 | 211 | public static function existsSignature($content) |
212 | 212 | { |
213 | - if (! Validator::isXML($content)) { |
|
213 | + if (!Validator::isXML($content)) { |
|
214 | 214 | throw SignerException::isNotXml(); |
215 | 215 | } |
216 | 216 | $dom = new \DOMDocument('1.0', 'utf-8'); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $decodedSignature = base64_decode( |
259 | 259 | str_replace(array("\r", "\n"), '', $signatureValue) |
260 | 260 | ); |
261 | - if (! $publicKey->verify($signInfoNode, $decodedSignature, $algorithm)) { |
|
261 | + if (!$publicKey->verify($signInfoNode, $decodedSignature, $algorithm)) { |
|
262 | 262 | throw SignerException::signatureComparisonFailed(); |
263 | 263 | } |
264 | 264 | return true; |