Completed
Push — develop ( b345eb...84b572 )
by Stuart
03:45
created
src/V1/Operations/AddHmac.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Copyright (c) 2017-present Ganbaro Digital Ltd
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public static function to(string $message, string $hashAlgo, string $key) : string
72 72
     {
73
-        $sig = CalculateHmac::for($message, $hashAlgo, $key);
73
+        $sig = CalculateHmac::for ($message, $hashAlgo, $key);
74 74
         return $sig . Hmac::MARKER . $message;
75 75
     }
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
src/V1/Operations/VerifyHmac.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Copyright (c) 2017-present Ganbaro Digital Ltd
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
      *         if the HMAC attached to $message doesn't match what we expect
76 76
      *         (strongly suggests $message has been tampered with)
77 77
      */
78
-    public static function for(string $message, $expectedHmac, string $hashAlgo, string $key)
78
+    public static function for (string $message, $expectedHmac, string $hashAlgo, string $key)
79 79
     {
80 80
         // has the message been tampered with?
81
-        $actualHmac = CalculateHmac::for($message, $hashAlgo, $key);
81
+        $actualHmac = CalculateHmac::for ($message, $hashAlgo, $key);
82 82
         if ($expectedHmac !== $actualHmac) {
83 83
             throw HmacVerificationFailed::newFromInputParameter($message, '$message');
84 84
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
75 75
      *         if the HMAC attached to $message doesn't match what we expect
76 76
      *         (strongly suggests $message has been tampered with)
77 77
      */
78
-    public static function for(string $message, $expectedHmac, string $hashAlgo, string $key)
79
-    {
78
+    public static function for(string $message, $expectedHmac, string $hashAlgo, string $key) {
80 79
         // has the message been tampered with?
81 80
         $actualHmac = CalculateHmac::for($message, $hashAlgo, $key);
82 81
         if ($expectedHmac !== $actualHmac) {
Please login to merge, or discard this patch.
src/V1/Operations/CalculateHmac.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Copyright (c) 2017-present Ganbaro Digital Ltd
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @throws UnsupportedHmacAlgorithm
69 69
      *         if $hashAlgo isn't supported by our PHP runtime
70 70
      */
71
-    public static function for(string $message, string $hashAlgo, string $key) : string
71
+    public static function for (string $message, string $hashAlgo, string $key) : string
72 72
     {
73 73
         // robustness!
74 74
         RequireValidHmacAlgorithm::apply()->to($hashAlgo);
Please login to merge, or discard this patch.
src/V1/Instructions/VerifyPayloadSignature.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Copyright (c) 2017-present Ganbaro Digital Ltd
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         //
76 76
         // if the HMAC is missing or invalid, it will throw an exception
77 77
         // so that we don't have to
78
-        Operations\VerifyHmac::for($message, $expectedHmac, $this->hmacType, $this->hmacKey);
78
+        Operations\VerifyHmac::for ($message, $expectedHmac, $this->hmacType, $this->hmacKey);
79 79
 
80 80
         // all done
81 81
         return $next->process($message);
Please login to merge, or discard this patch.