Completed
Push — master ( 393139...42de56 )
by Mitchel
02:18
created
src/Certificate/CertificateType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      */
103 103
     private function __construct($certificateType)
104 104
     {
105
-        $this->certificateType = (string)$certificateType;
105
+        $this->certificateType = (string) $certificateType;
106 106
 
107 107
         $this->protect();
108 108
     }
Please login to merge, or discard this patch.
src/Certificate/DefaultCertificate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
      */
41 41
     private function __construct($certificate)
42 42
     {
43
-        $this->certificate = (string)$certificate;
43
+        $this->certificate = (string) $certificate;
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
src/Exception/BunqException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
         $this->responseArray = json_decode((string) $this->exception->getResponse()->getBody(), true);
26 26
 
27 27
         parent::__construct(
28
-            'Path: ' . $exception->getRequest()->getUri()->getPath() .
29
-            ', Message: ' . (string)$exception->getResponse()->getBody(),
28
+            'Path: '.$exception->getRequest()->getUri()->getPath().
29
+            ', Message: '.(string) $exception->getResponse()->getBody(),
30 30
             $exception->getCode()
31 31
         );
32 32
     }
Please login to merge, or discard this patch.
src/HttpClientFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             Middleware::mapRequest(new RequestSignatureMiddleware($certificateStorage->load(CertificateType::PRIVATE_KEY())))
34 34
         );
35 35
 
36
-        return self::createBaseClient((string)$url, $handlerStack);
36
+        return self::createBaseClient((string) $url, $handlerStack);
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
src/Middleware/ResponseSignatureMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $verify = openssl_verify(
46 46
             $signatureData,
47 47
             $decodedServerSignature,
48
-            (string)$this->publicKey,
48
+            (string) $this->publicKey,
49 49
             self::SIGNATURE_ALGORITHM
50 50
         );
51 51
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $signatureData = $response->getStatusCode();
67 67
         $signatureData .= $this->convertHeadersToSignatureData($response);
68 68
         $signatureData .= "\n\n";
69
-        $signatureData .= (string)$response->getBody();
69
+        $signatureData .= (string) $response->getBody();
70 70
 
71 71
         return $signatureData;
72 72
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
             // Add all header data to verify signature
97 97
             foreach ($values as $value) {
98
-                $signatureData .= PHP_EOL . $header . ': ' . $value;
98
+                $signatureData .= PHP_EOL.$header.': '.$value;
99 99
             }
100 100
         }
101 101
 
Please login to merge, or discard this patch.
src/Middleware/RequestSignatureMiddleware.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
         $headers = $request->getHeaders();
56 56
         ksort($headers);
57 57
 
58
-        $signatureData = $request->getMethod() . ' ' . $request->getRequestTarget();
58
+        $signatureData = $request->getMethod().' '.$request->getRequestTarget();
59 59
         $signatureData .= $this->createSignatureDataFromHeaders($headers);
60 60
         $signatureData .= "\n\n";
61 61
 
62
-        $body = (string)$request->getBody();
62
+        $body = (string) $request->getBody();
63 63
         if (!empty($body)) {
64 64
             $signatureData .= $body;
65 65
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     || $header === 'Cache-Control'
83 83
                     || substr($header, 0, 7) === 'X-Bunq-'
84 84
                 ) {
85
-                    $signatureData .= PHP_EOL . $header . ': ' . $value;
85
+                    $signatureData .= PHP_EOL.$header.': '.$value;
86 86
                 }
87 87
             }
88 88
         }
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
      */
99 99
     private function sign($data)
100 100
     {
101
-        if (openssl_sign((string)$data, $signature, $this->privateKey->toString(), static::SIGNATURE_ALGORITHM) !== true) {
102
-            throw new \Exception("Could not sign request: " . openssl_error_string());
101
+        if (openssl_sign((string) $data, $signature, $this->privateKey->toString(), static::SIGNATURE_ALGORITHM) !== true) {
102
+            throw new \Exception("Could not sign request: ".openssl_error_string());
103 103
         }
104 104
 
105 105
         return $signature;
Please login to merge, or discard this patch.
src/Middleware/RequestAuthenticationMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
         // Use the session token if not overridden with installation token
34 34
         if (!isset($headers['X-Bunq-Client-Authentication'])) {
35
-            $headers['X-Bunq-Client-Authentication'] = (string)$this->sessionToken->toString();
35
+            $headers['X-Bunq-Client-Authentication'] = (string) $this->sessionToken->toString();
36 36
         }
37 37
 
38 38
         return new Request(
Please login to merge, or discard this patch.
tests/Token/DefaultTokenTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,6 @@
 block discarded – undo
17 17
 
18 18
         $this->assertInstanceOf(Token::class, $token);
19 19
         $this->assertSame('string', $token->toString());
20
-        $this->assertSame('string', (string)$token);
20
+        $this->assertSame('string', (string) $token);
21 21
     }
22 22
 }
Please login to merge, or discard this patch.
tests/Token/TokenTypeTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
         $this->assertInstanceOf(TokenType::class, $token);
18 18
         $this->assertEquals('installation.token', $token->toString());
19
-        $this->assertEquals('installation.token', (string)$token);
19
+        $this->assertEquals('installation.token', (string) $token);
20 20
 
21 21
         $this->assertTrue($token->equals(TokenType::INSTALLATION_TOKEN()));
22 22
         $this->assertFalse($token->equals(TokenType::SESSION_TOKEN()));
Please login to merge, or discard this patch.