Completed
Pull Request — master (#186)
by
unknown
05:04
created
src/Signer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         if (empty($content)) {
61 61
             throw SignerException::isNotXml();
62 62
         }
63
-        if (! Validator::isXML($content)) {
63
+        if (!Validator::isXML($content)) {
64 64
             throw SignerException::isNotXml();
65 65
         }
66 66
         $dom = new DOMDocument('1.0', 'UTF-8');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $nsSignatureMethod = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256';
121 121
             $nsDigestMethod = 'http://www.w3.org/2001/04/xmlenc#sha256';
122 122
         }
123
-        $nsTransformMethod1 ='http://www.w3.org/2000/09/xmldsig#enveloped-signature';
123
+        $nsTransformMethod1 = 'http://www.w3.org/2000/09/xmldsig#enveloped-signature';
124 124
         $nsTransformMethod2 = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315';
125 125
         $idSigned = trim($node->getAttribute($mark));
126 126
         $digestValue = self::makeDigest($node, $digestAlgorithm, $canonical);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public static function removeSignature($content)
177 177
     {
178
-        if (! self::existsSignature($content)) {
178
+        if (!self::existsSignature($content)) {
179 179
             return $content;
180 180
         }
181 181
         $dom = new \DOMDocument('1.0', 'utf-8');
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      */
221 221
     public static function existsSignature($content)
222 222
     {
223
-        if (! Validator::isXML($content)) {
223
+        if (!Validator::isXML($content)) {
224 224
             throw SignerException::isNotXml();
225 225
         }
226 226
         $dom = new \DOMDocument('1.0', 'utf-8');
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         $decodedSignature = base64_decode(
266 266
             str_replace(array("\r", "\n"), '', $signatureValue)
267 267
         );
268
-        if (! $publicKey->verify($signInfoNode, $decodedSignature, $algorithm)) {
268
+        if (!$publicKey->verify($signInfoNode, $decodedSignature, $algorithm)) {
269 269
             throw SignerException::signatureComparisonFailed();
270 270
         }
271 271
         return true;
Please login to merge, or discard this patch.