Completed
Push — master ( c44ae3...d95cc8 )
by Jan
03:36
created
src/Call/InitPaymentRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 			'closePayment' => $this->closePayment,
144 144
 			'returnUrl' => $this->returnUrl,
145 145
 			'returnMethod' => $this->returnMethod->getValue(),
146
-			'cart' => array_map(function (CartItem $cartItem) {
146
+			'cart' => array_map(function(CartItem $cartItem) {
147 147
 				$cartItemValues = [
148 148
 					'name' => $cartItem->getName(),
149 149
 					'quantity' => $cartItem->getQuantity(),
Please login to merge, or discard this patch.
src/Api/Driver/GuzzleDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
 			$responseCode = new ResponseCode($httpResponse->getStatusCode());
48 48
 
49
-			$responseHeaders = array_map(function ($item) {
49
+			$responseHeaders = array_map(function($item) {
50 50
 				return !is_array($item) || count($item) > 1 ? $item : array_shift($item);
51 51
 			}, $httpResponse->getHeaders());
52 52
 
Please login to merge, or discard this patch.
src/Call/ProcessPaymentRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 				'paymentStatus' => null,
63 63
 				'authCode' => null,
64 64
 			]),
65
-			function (Response $response) {
65
+			function(Response $response) {
66 66
 				// This handles edge case when provided payId is missing or already expired on gateway
67 67
 				// In this case gateway responds with HTTP 200 and HTML content. Bad API.
68 68
 				// See https://github.com/csob/paymentgateway/issues/135
Please login to merge, or discard this patch.
tests/unit/Api/ApiClientTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
 		} else {
142 142
 			$apiClientDriver->expects(self::once())
143 143
 				->method('request')
144
-				->willReturnCallback(function (HttpMethod $method, string $url, array $requestData) use ($httpMethod, $expectedUrl, $expectedRequestData, $responseCode, $responseData, $responseHeaders): Response {
144
+				->willReturnCallback(function(HttpMethod $method, string $url, array $requestData) use ($httpMethod, $expectedUrl, $expectedRequestData, $responseCode, $responseData, $responseHeaders): Response {
145 145
 					$this->assertEquals($httpMethod, $method);
146 146
 					$this->assertSame(sprintf('%s/%s', self::API_URL, $expectedUrl), $url);
147 147
 					$dttm = $requestData['dttm'];
Please login to merge, or discard this patch.
tests/unit/Crypto/CryptoServiceTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 	protected function setUp()
14 14
 	{
15 15
 		$this->cryptoService = new CryptoService(
16
-			__DIR__ . '/../../keys/client.key',
17
-			__DIR__ . '/../../keys/client.pub'
16
+			__DIR__.'/../../keys/client.key',
17
+			__DIR__.'/../../keys/client.pub'
18 18
 		);
19 19
 	}
20 20
 
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 	public function testExceptions()
84 84
 	{
85 85
 		$cryptoService = new CryptoService(
86
-			__DIR__ . '/invalid-key.key',
87
-			__DIR__ . '/invalid-key.key'
86
+			__DIR__.'/invalid-key.key',
87
+			__DIR__.'/invalid-key.key'
88 88
 		);
89 89
 
90 90
 		try {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			$this->fail();
93 93
 
94 94
 		} catch (PrivateKeyFileException $e) {
95
-			$this->assertSame(__DIR__ . '/invalid-key.key', $e->getPrivateKeyFile());
95
+			$this->assertSame(__DIR__.'/invalid-key.key', $e->getPrivateKeyFile());
96 96
 		}
97 97
 
98 98
 		try {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 			$this->fail();
101 101
 
102 102
 		} catch (PublicKeyFileException $e) {
103
-			$this->assertSame(__DIR__ . '/invalid-key.key', $e->getPublicKeyFile());
103
+			$this->assertSame(__DIR__.'/invalid-key.key', $e->getPublicKeyFile());
104 104
 		}
105 105
 	}
106 106
 
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function testExceptions2()
111 111
 	{
112
-		include __DIR__ . '/GlobalFunctionsMock.php';
112
+		include __DIR__.'/GlobalFunctionsMock.php';
113 113
 
114 114
 		$cryptoService = new CryptoService(
115
-			__DIR__ . '/../../keys/client.key',
116
-			__DIR__ . '/../../keys/bank.pub'
115
+			__DIR__.'/../../keys/client.key',
116
+			__DIR__.'/../../keys/bank.pub'
117 117
 		);
118 118
 
119 119
 		try {
Please login to merge, or discard this patch.
tests/unit/ValidatorTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		Validator::checkReturnUrl('https://example.com');
79 79
 
80 80
 		try {
81
-			Validator::checkReturnUrl('https://example.com/' . implode('-', array_fill(0, 100, 'long')));
81
+			Validator::checkReturnUrl('https://example.com/'.implode('-', array_fill(0, 100, 'long')));
82 82
 			$this->fail();
83 83
 
84 84
 		} catch (\InvalidArgumentException $e) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		Validator::checkDescription('foo description');
92 92
 
93 93
 		try {
94
-			Validator::checkDescription(implode(' ', array_fill(0, 60, 'very')) . ' long description');
94
+			Validator::checkDescription(implode(' ', array_fill(0, 60, 'very')).' long description');
95 95
 			$this->fail();
96 96
 
97 97
 		} catch (\InvalidArgumentException $e) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		Validator::checkMerchantData('foo merchant data');
105 105
 
106 106
 		try {
107
-			Validator::checkMerchantData(implode(' ', array_fill(0, 60, 'very')) . ' long merchantData');
107
+			Validator::checkMerchantData(implode(' ', array_fill(0, 60, 'very')).' long merchantData');
108 108
 			$this->fail();
109 109
 
110 110
 		} catch (\InvalidArgumentException $e) {
Please login to merge, or discard this patch.
tests/unit/Api/Driver/CurlDriverTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	 */
16 16
 	public function testRequest()
17 17
 	{
18
-		include __DIR__ . '/CurlMock.php';
18
+		include __DIR__.'/CurlMock.php';
19 19
 
20 20
 		$curlDriver = new CurlDriver();
21 21
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function testCurlDriverException()
45 45
 	{
46
-		include __DIR__ . '/Curl_exec_false_Mock.php';
46
+		include __DIR__.'/Curl_exec_false_Mock.php';
47 47
 
48 48
 		$curlDriver = new CurlDriver();
49 49
 
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php declare(strict_types = 1);
2 2
 
3
-require __DIR__ . '/../vendor/autoload.php';
3
+require __DIR__.'/../vendor/autoload.php';
Please login to merge, or discard this patch.
src/Validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,9 +108,9 @@
 block discarded – undo
108 108
 	private static function checkWhitespaces(string $argument)
109 109
 	{
110 110
 		$charlist = preg_quote(" \t\n\r\0\x0B\xC2\xA0", '#');
111
-		preg_replace('#^[' . $charlist . ']+|[' . $charlist . ']+\z#u', '', $argument);
111
+		preg_replace('#^['.$charlist.']+|['.$charlist.']+\z#u', '', $argument);
112 112
 
113
-		if ($argument !== preg_replace('#^[' . $charlist . ']+|[' . $charlist . ']+\z#u', '', $argument)) {
113
+		if ($argument !== preg_replace('#^['.$charlist.']+|['.$charlist.']+\z#u', '', $argument)) {
114 114
 			throw new \InvalidArgumentException('Argument starts or ends with whitespace.');
115 115
 		}
116 116
 	}
Please login to merge, or discard this patch.