Completed
Pull Request — master (#1)
by Mathew
02:16
created
src/Http/ResponseCodes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,6 +36,6 @@
 block discarded – undo
36 36
      */
37 37
     public function getMessage($responseCode)
38 38
     {
39
-        return $this->messages[$responseCode];
39
+        return $this->messages[ $responseCode ];
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Response/Accounts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      * @var Accounts\Account[]
16 16
      * @JMS\Type("array<Thepixeldeveloper\Mondo\Response\Account>")
17 17
      */
18
-    protected $accounts = [];
18
+    protected $accounts = [ ];
19 19
 
20 20
     /**
21 21
      * @return Accounts\Account[]
Please login to merge, or discard this patch.
src/Response/Transactions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * @var Transaction[]
19 19
      * @JMS\Type("array<\Thepixeldeveloper\Mondo\Response\Transactions\Transaction>")
20 20
      */
21
-    protected $transactions = [];
21
+    protected $transactions = [ ];
22 22
 
23 23
     /**
24 24
      * @return Transactions\Transaction[]
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      *
42 42
      * @return \Psr\Http\Message\ResponseInterface
43 43
      */
44
-    public function get($uri, $options = [])
44
+    public function get($uri, $options = [ ])
45 45
     {
46 46
         return $this->guzzleClient->request('GET', $uri, $options);
47 47
     }
Please login to merge, or discard this patch.
src/ClientInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      *
18 18
      * @return mixed
19 19
      */
20
-    public function get($uri, $options = []);
20
+    public function get($uri, $options = [ ]);
21 21
 
22 22
     /**
23 23
      * @param ResponseInterface $data
Please login to merge, or discard this patch.
src/Client/Transactions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function getTransaction($transactionId)
35 35
     {
36 36
         return $this->client->deserializeResponse(
37
-            $this->client->get('/transactions/' . $transactionId),
37
+            $this->client->get('/transactions/'.$transactionId),
38 38
             Response\Transactions\Transaction::class
39 39
         );
40 40
     }
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
     public function addAnnotationForTransaction($transactionId, $key, $value = null)
71 71
     {
72 72
         if (is_string($key)) {
73
-            $metadata = [$key => $value];
73
+            $metadata = [ $key => $value ];
74 74
         } else {
75 75
             $metadata = $key;
76 76
         }
77 77
 
78
-        return $this->client->get('/transactions/' . $transactionId, [
79
-            'body' => ['metadata' => $metadata],
78
+        return $this->client->get('/transactions/'.$transactionId, [
79
+            'body' => [ 'metadata' => $metadata ],
80 80
         ]);
81 81
     }
82 82
 
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
     public function removeAnnotationForTransaction($transactionId, $keys)
92 92
     {
93 93
         if (is_string($keys)) {
94
-            $keys = [$keys];
94
+            $keys = [ $keys ];
95 95
         }
96 96
 
97 97
         $keys = array_flip($keys);
98 98
 
99
-        return $this->client->get('/transactions/' . $transactionId, [
100
-            'body' => ['metadata' => $keys],
99
+        return $this->client->get('/transactions/'.$transactionId, [
100
+            'body' => [ 'metadata' => $keys ],
101 101
         ]);
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
src/GuzzleClientFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         return (new \GuzzleHttp\Client([
69 69
             'base_uri' => $this->getBaseUrl(),
70 70
             'headers'  => [
71
-                'Authorization' => 'Bearer ' . $this->getAccessToken(),
71
+                'Authorization' => 'Bearer '.$this->getAccessToken(),
72 72
             ],
73 73
         ]));
74 74
     }
Please login to merge, or discard this patch.
integration/client_example.php 1 patch
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
-require_once __DIR__ . '/../vendor/autoload.php';
3
+require_once __DIR__.'/../vendor/autoload.php';
4 4
 
5 5
 use Doctrine\Common\Annotations\AnnotationRegistry;
6 6
 use JMS\Serializer\SerializerBuilder;
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
 $outputBlock('Your user ID: ', $ping->whoAmI()->getUserId());
37 37
 
38 38
 $accounts  = new Mondo\Client\Accounts($client);
39
-$accountId = $accounts->getAccounts()->getAccounts()[0]->getId();
39
+$accountId = $accounts->getAccounts()->getAccounts()[ 0 ]->getId();
40 40
 $outputBlock('Your first account ID: ', $accountId);
41 41
 
42 42
 $balance = new Mondo\Client\Balance($client);
43 43
 $outputBlock('Your balance: ', $balance->getBalanceForAccountId($accountId)->getBalance());
44 44
 
45 45
 $transactions  = new Mondo\Client\Transactions($client);
46
-$transactionId = $transactions->getTransactionsForAccountId($accountId)->getTransactions()[0]->getId();
46
+$transactionId = $transactions->getTransactionsForAccountId($accountId)->getTransactions()[ 0 ]->getId();
47 47
 
48 48
 $outputBlock('How many transactions you\'ve made: ', count($transactions->getTransactionsForAccountId($accountId)->getTransactions()));
49 49
 $outputBlock('First transaction: ', $transactions->getTransaction($transactionId)->getDescription());
Please login to merge, or discard this patch.
src/Response/Transactions/Transaction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      * @var array
75 75
      * @JMS\Type("array")
76 76
      */
77
-    protected $metadata = [];
77
+    protected $metadata = [ ];
78 78
 
79 79
     /**
80 80
      * Balance.
Please login to merge, or discard this patch.