Passed
Branch master (b0218f)
by Amelia
04:09
created
Category
src/MonzoServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $this->mergeConfigFrom(__DIR__ . '/../config/monzo.php', 'monzo');
27 27
 
28 28
         if (class_exists('Laravel\Socialite\SocialiteManager')) {
29
-            \Laravel\Socialite\Facades\Socialite::extend('monzo', function () {
29
+            \Laravel\Socialite\Facades\Socialite::extend('monzo', function() {
30 30
                 $config = $this->app['config']['monzo'];
31 31
 
32 32
                 return new MonzoProvider(
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function register()
53 53
     {
54
-        $this->app->bind(ClientContract::class, function (Application $app) {
54
+        $this->app->bind(ClientContract::class, function(Application $app) {
55 55
             $config = $app['config']['monzo'];
56 56
 
57 57
             return new Client(new Guzzle, $config['id'], $config['secret']);
58 58
         });
59 59
 
60
-        $this->app->singleton(Monzo::class, function (Application $app) {
60
+        $this->app->singleton(Monzo::class, function(Application $app) {
61 61
             return new Monzo($app->make(ClientContract::class));
62 62
         });
63 63
 
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
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
             throw MonzoException::fromResponse($response, $body, $errorCode);
121 121
         }
122 122
 
123
-        if ($key !== null && ! array_key_exists($key, $json)) {
123
+        if ($key !== null && !array_key_exists($key, $json)) {
124 124
             throw new UnexpectedValueException("Expected to find a [$key] key within the response; none found.");
125 125
         }
126 126
 
Please login to merge, or discard this patch.
src/Models/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function toJsonArray()
95 95
     {
96
-        return collect($this->toArray())->map(function ($value) {
96
+        return collect($this->toArray())->map(function($value) {
97 97
             return $value instanceof Carbon
98 98
                 ? $value->format('Y-m-d\TH:i:s.uP')
99 99
                 : $value;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function cast(string $key, $value)
149 149
     {
150
-        if (! array_key_exists($key, $this->casts) || $value === null) {
150
+        if (!array_key_exists($key, $this->casts) || $value === null) {
151 151
             return $value;
152 152
         }
153 153
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     protected function castClass(string $cast, $value, bool $collection = false)
184 184
     {
185 185
         if ($collection) {
186
-            return collect($value)->map(function (array $item) use ($cast) {
186
+            return collect($value)->map(function(array $item) use ($cast) {
187 187
                 return new $cast($item);
188 188
             });
189 189
         }
Please login to merge, or discard this patch.
src/Api/Webhooks.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
             'account_id' => $account ?? $this->getAccountId(),
19 19
         ], [], 'webhooks');
20 20
 
21
-        return collect($results)->map(function ($item) {
21
+        return collect($results)->map(function($item) {
22 22
             return new Webhook($item, $this);
23 23
         });
24 24
     }
Please login to merge, or discard this patch.
src/Api/Accounts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $results = $this->call('GET', 'accounts', [], [], 'accounts');
25 25
 
26
-        return collect($results)->map(function ($item) {
26
+        return collect($results)->map(function($item) {
27 27
             return new Account($item, $this);
28 28
         });
29 29
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $accounts = $this->accounts();
43 43
 
44
-        $account = $accounts->first(function (Account $account) {
44
+        $account = $accounts->first(function(Account $account) {
45 45
             return $account->type === 'uk_retail';
46 46
         });
47 47
 
Please login to merge, or discard this patch.
src/Api/Transactions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
                 'account_id' => $account ?? $this->getAccountId(),
20 20
             ], [], 'transactions', false);
21 21
 
22
-        return collect($results)->map(function ($item) {
22
+        return collect($results)->map(function($item) {
23 23
             return new Transaction($item, $this);
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
src/Api/Pots.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
      */
15 15
     public function pots()
16 16
     {
17
-        $results = $this->withErrorHandling(function () {
17
+        $results = $this->withErrorHandling(function() {
18 18
             return $this->client
19 19
                 ->newClient()
20 20
                 ->token($this->getAccessToken())
21 21
                 ->call('GET', 'pots/listV1', [], [], 'pots');
22 22
         });
23 23
 
24
-        return collect($results)->map(function ($item) {
24
+        return collect($results)->map(function($item) {
25 25
             return new Pot($item, $this);
26 26
         });
27 27
     }
Please login to merge, or discard this patch.
src/Api/ErrorHandling.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public function call(string $method, string $endpoint, array $query = [], array $data = [], ?string $key = null, bool $new = true)
67 67
     {
68
-        return $this->retry(function () use ($method, $endpoint, $query, $data, $key, $new) {
68
+        return $this->retry(function() use ($method, $endpoint, $query, $data, $key, $new) {
69 69
             return $this->client($new)
70 70
                 ->token($this->getAccessToken())
71 71
                 ->call($method, $endpoint, $query, $data, $key);
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 {
37 37
     $type = $response->getHeaderLine('Content-Type');
38 38
 
39
-    if (! str_is('application/*json', $type)) {
39
+    if (!str_is('application/*json', $type)) {
40 40
         throw new UnexpectedValueException("Expected application/*json, got $type");
41 41
     }
42 42
 
Please login to merge, or discard this patch.