@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | use GanbaroDigital\MessagingPipeline\V1\BuildMessagingPipelines; |
6 | 6 | use GanbaroDigital\MessagingPipeline\V1\InstructionBuilders; |
@@ -1,6 +1,6 @@ discard block |
||
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 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * if the HMAC attached to $message doesn't match what we expect |
74 | 74 | * (strongly suggests $message has been tampered with) |
75 | 75 | */ |
76 | - public static function for(string $message, $expectedHmac, string $hashAlgo, string $key) |
|
76 | + public static function for (string $message, $expectedHmac, string $hashAlgo, string $key) |
|
77 | 77 | { |
78 | 78 | // robustness! |
79 | 79 | RequireValidHmacAlgorithm::apply()->to($hashAlgo); |
@@ -1,6 +1,6 @@ discard block |
||
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 |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | * @throws CannotJsonEncode |
66 | 66 | * if the PHP value cannot be represented in JSON encoding format |
67 | 67 | */ |
68 | - public static function from($item, $fieldOrVarName='$item') : string |
|
68 | + public static function from($item, $fieldOrVarName = '$item') : string |
|
69 | 69 | { |
70 | 70 | // deal with encoding problems |
71 | 71 | $errorMessage = null; |
72 | - set_error_handler(function ($errno, $errstr) use (&$errorMessage) { |
|
72 | + set_error_handler(function($errno, $errstr) use (&$errorMessage) { |
|
73 | 73 | $errorMessage = $errstr; |
74 | 74 | }); |
75 | 75 | $retval = json_encode($item); |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -1,6 +1,6 @@ discard block |
||
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 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | // deal with decryption problems |
81 | 81 | $errorMessage = null; |
82 | - set_error_handler(function ($errno, $errstr) use (&$errorMessage) { |
|
82 | + set_error_handler(function($errno, $errstr) use (&$errorMessage) { |
|
83 | 83 | $errorMessage = $errstr; |
84 | 84 | }); |
85 | 85 | $retval = openssl_decrypt( |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -1,6 +1,6 @@ discard block |
||
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 |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | * @throws CannotJsonDecode |
66 | 66 | * if PHP's json_decode() rejected $item |
67 | 67 | */ |
68 | - public static function from(string $item, string $fieldOrVarName='$item') |
|
68 | + public static function from(string $item, string $fieldOrVarName = '$item') |
|
69 | 69 | { |
70 | 70 | // deal with decoding problems |
71 | 71 | $errorMessage = null; |
72 | - set_error_handler(function ($errno, $errstr) use (&$errorMessage) { |
|
72 | + set_error_handler(function($errno, $errstr) use (&$errorMessage) { |
|
73 | 73 | $errorMessage = $errstr; |
74 | 74 | }); |
75 | 75 | $retval = json_decode($item); |
@@ -1,6 +1,6 @@ discard block |
||
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 |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | * @throws CannotBase64Decode |
66 | 66 | * if PHP's base64_decode() rejects $item |
67 | 67 | */ |
68 | - public static function from(string $item, $fieldOrVarName='$item') : string |
|
68 | + public static function from(string $item, $fieldOrVarName = '$item') : string |
|
69 | 69 | { |
70 | 70 | // deal with decoding problems |
71 | 71 | $errorMessage = null; |
72 | - set_error_handler(function ($errno, $errstr) use (&$errorMessage) { |
|
72 | + set_error_handler(function($errno, $errstr) use (&$errorMessage) { |
|
73 | 73 | $errorMessage = $errstr; |
74 | 74 | }); |
75 | 75 | $retval = base64_decode($item, true); |