@@ -13,10 +13,10 @@ |
||
13 | 13 | */ |
14 | 14 | public function itRepresentsADefaultCertificate() |
15 | 15 | { |
16 | - $certificate = DefaultCertificate::fromString('certificate'); |
|
16 | + $certificate = DefaultCertificate::fromString('certificate'); |
|
17 | 17 | |
18 | - $this->assertInstanceOf(DefaultCertificate::class, $certificate); |
|
19 | - $this->assertInstanceOf(Certificate::class, $certificate); |
|
20 | - $this->assertEquals('certificate', $certificate->toString()); |
|
18 | + $this->assertInstanceOf(DefaultCertificate::class, $certificate); |
|
19 | + $this->assertInstanceOf(Certificate::class, $certificate); |
|
20 | + $this->assertEquals('certificate', $certificate->toString()); |
|
21 | 21 | } |
22 | 22 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $publicKey = CertificateType::PRIVATE_KEY(); |
29 | 29 | |
30 | 30 | @mkdir('/tmp/certificates'); |
31 | - file_put_contents('/tmp/certificates/' . $publicKey, $certificate->toString()); |
|
31 | + file_put_contents('/tmp/certificates/'.$publicKey, $certificate->toString()); |
|
32 | 32 | |
33 | 33 | $loadedCertificate = $this->storage->load($publicKey); |
34 | 34 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | $this->storage->save($certificate, $publicKey); |
47 | 47 | |
48 | - $result = @file_get_contents('/tmp/certificates/' . $publicKey); |
|
48 | + $result = @file_get_contents('/tmp/certificates/'.$publicKey); |
|
49 | 49 | |
50 | 50 | $this->assertSame($certificate->toString(), $result); |
51 | 51 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $uri->getPath()->willReturn('/path'); |
23 | 23 | |
24 | 24 | /** @var RequestInterface|ObjectProphecy $request */ |
25 | - $request = $this->prophesize(RequestInterface::class); |
|
25 | + $request = $this->prophesize(RequestInterface::class); |
|
26 | 26 | $request->getUri()->willReturn($uri); |
27 | 27 | |
28 | 28 | /** @var ResponseInterface|ObjectProphecy $response */ |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function itSignsARequest() |
44 | 44 | { |
45 | - $headers = [ |
|
45 | + $headers = [ |
|
46 | 46 | 'X-Bunq-Client-Request-Id' => '253e0f90-8842-4731-91dd-0191816e6a28', |
47 | 47 | 'X-Bunq-Client-Authentication' => 'session-token', |
48 | 48 | 'Cache-Control' => 'no-cache', |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | $result = $this->middleware->__invoke($request); |
57 | 57 | |
58 | - $expectedHeaders = [ |
|
58 | + $expectedHeaders = [ |
|
59 | 59 | 'X-Bunq-Client-Request-Id' => '253e0f90-8842-4731-91dd-0191816e6a28', |
60 | 60 | 'X-Bunq-Client-Authentication' => 'session-token', |
61 | 61 | 'Cache-Control' => 'no-cache', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | $result = $this->middleware->__invoke($request); |
43 | 43 | |
44 | - $headers = [ |
|
44 | + $headers = [ |
|
45 | 45 | 'X-Bunq-Client-Request-Id' => '253e0f90-8842-4731-91dd-0191816e6a28', |
46 | 46 | 'Cache-Control' => 'no-cache', |
47 | 47 | 'X-Bunq-Geolocation' => '52.3 4.89 12 100 NL', |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | $result = $this->middleware->__invoke($request, ['request-id' => $givenRequestId]); |
66 | 66 | |
67 | - $headers = [ |
|
67 | + $headers = [ |
|
68 | 68 | 'X-Bunq-Client-Request-Id' => $givenRequestId, |
69 | 69 | 'Cache-Control' => 'no-cache', |
70 | 70 | 'X-Bunq-Geolocation' => '52.3 4.89 12 100 NL', |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | ) { |
49 | 49 | $this->httpClient = $httpClient; |
50 | 50 | $this->certificateStorage = $certificateStorage; |
51 | - $this->apiKey = (string)$apiKey; |
|
51 | + $this->apiKey = (string) $apiKey; |
|
52 | 52 | $this->permittedIps = $permittedIps; |
53 | 53 | } |
54 | 54 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ] |
71 | 71 | ); |
72 | 72 | |
73 | - $responseArray = \json_decode((string)$response->getBody(), true); |
|
73 | + $responseArray = \json_decode((string) $response->getBody(), true); |
|
74 | 74 | |
75 | 75 | return [ |
76 | 76 | 'token' => $responseArray['Response'][1]['Token']['token'], |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ] |
124 | 124 | ); |
125 | 125 | |
126 | - $responseArray = \json_decode((string)$response->getBody(), true); |
|
126 | + $responseArray = \json_decode((string) $response->getBody(), true); |
|
127 | 127 | |
128 | 128 | return $responseArray['Response'][1]['Token']['token']; |
129 | 129 | } |