Passed
Push — master ( 4df141...b8bd7b )
by James
06:09 queued 16s
created
app/Http/Middleware/Request.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             return null;
124 124
         }
125 125
 
126
-        return (float) $res;
126
+        return (float)$res;
127 127
     }
128 128
 
129 129
     /**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function integer(string $field): int
137 137
     {
138
-        return (int) $this->get($field);
138
+        return (int)$this->get($field);
139 139
     }
140 140
 
141 141
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             return null;
155 155
         }
156 156
 
157
-        return (int) $string;
157
+        return (int)$string;
158 158
     }
159 159
 
160 160
     /**
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
             return null;
171 171
         }
172 172
 
173
-        $value = (string) $this->get($field);
173
+        $value = (string)$this->get($field);
174 174
         if ('' === $value) {
175 175
             return null;
176 176
         }
177 177
 
178
-        return (int) $value;
178
+        return (int)$value;
179 179
     }
180 180
 
181 181
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             return null;
192 192
         }
193 193
 
194
-        return $this->cleanString((string) ($this->get($field) ?? ''));
194
+        return $this->cleanString((string)($this->get($field) ?? ''));
195 195
     }
196 196
 
197 197
     /**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function string(string $field): string
205 205
     {
206
-        return $this->cleanString((string) ($this->get($field) ?? ''));
206
+        return $this->cleanString((string)($this->get($field) ?? ''));
207 207
     }
208 208
 
209 209
     /**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         if (null === $this->get($field)) {
255 255
             return null;
256 256
         }
257
-        $value = (string) $this->get($field);
257
+        $value = (string)$this->get($field);
258 258
         if (10 === strlen($value)) {
259 259
             // probably a date format.
260 260
             try {
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
      */
289 289
     private function cleanString(string $string): string
290 290
     {
291
-        $search  = [
291
+        $search = [
292 292
             "\u{0001}", // start of heading
293 293
             "\u{0002}", // start of text
294 294
             "\u{0003}", // end of text
Please login to merge, or discard this patch.
app/Http/Controllers/TokenController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
     public function doValidate(): JsonResponse
50 50
     {
51 51
         $response = ['result' => 'OK', 'message' => null];
52
-        $token    = (string) config('bunq.access_token');
53
-        $uri      = (string) config('bunq.uri');
52
+        $token    = (string)config('bunq.access_token');
53
+        $uri      = (string)config('bunq.uri');
54 54
         app('log')->debug(sprintf('Going to try and access %s', $uri));
55 55
         $request = new SystemInformationRequest($uri, $token);
56 56
         try {
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function index()
94 94
     {
95
-        $token = (string) config('bunq.access_token');
96
-        $uri   = (string) config('bunq.uri');
95
+        $token = (string)config('bunq.access_token');
96
+        $uri   = (string)config('bunq.uri');
97 97
         app('log')->debug(sprintf('Going to try and access %s', $uri));
98 98
         $request      = new SystemInformationRequest($uri, $token);
99 99
         $errorMessage = 'No error message.';
Please login to merge, or discard this patch.
app/Http/Controllers/Import/UploadController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             app('log')->debug('Config file is present.');
65 65
             $errorNumber = $configFile->getError();
66 66
             if (0 !== $errorNumber) {
67
-                $errors->add('config_file', (string) $errorNumber);
67
+                $errors->add('config_file', (string)$errorNumber);
68 68
             }
69 69
             // upload the file to a temp directory and use it from there.
70 70
             if (0 === $errorNumber) {
Please login to merge, or discard this patch.
app/Http/Controllers/Import/MappingController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
      */
118 118
     private function getFireflyIIIAccounts(): array
119 119
     {
120
-        $token   = (string) config('bunq.access_token');
121
-        $uri     = (string) config('bunq.uri');
120
+        $token   = (string)config('bunq.access_token');
121
+        $uri     = (string)config('bunq.uri');
122 122
         $request = new GetAccountsRequest($uri, $token);
123 123
         /** @var GetAccountsResponse $result */
124 124
         $result = $request->get();
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
             if ('reconciliation' === $type || 'initial-balance' === $type) {
129 129
                 continue;
130 130
             }
131
-            $id                 = (int) $entry->id;
131
+            $id                 = (int)$entry->id;
132 132
             $return[$type][$id] = $entry->name;
133
-            if ('' !== (string) $entry->iban) {
133
+            if ('' !== (string)$entry->iban) {
134 134
                 $return[$type][$id] = sprintf('%s (%s)', $entry->name, $entry->iban);
135 135
             }
136 136
         }
@@ -155,17 +155,17 @@  discard block
 block discarded – undo
155 155
         /** @var array $account */
156 156
         foreach ($array as $account) {
157 157
             foreach ($account as $entry) {
158
-                if ('' === trim((string) $entry['counter_party']['iban'])) {
158
+                if ('' === trim((string)$entry['counter_party']['iban'])) {
159 159
                     $opposing[] = trim($entry['counter_party']['display_name']);
160 160
                 }
161
-                if ('' !== trim((string) $entry['counter_party']['iban'])) {
161
+                if ('' !== trim((string)$entry['counter_party']['iban'])) {
162 162
                     $opposing[] = sprintf('%s (%s)', trim($entry['counter_party']['display_name']), trim($entry['counter_party']['iban']));
163 163
                 }
164 164
             }
165 165
         }
166 166
         $filtered = array_filter(
167 167
             $opposing,
168
-            static function (string $value) {
168
+            static function(string $value) {
169 169
                 return '' !== $value;
170 170
             }
171 171
         );
Please login to merge, or discard this patch.
app/Http/Controllers/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             'BUNQ_API_URI'             => 'bunq.api_uri',
49 49
         ];
50 50
         foreach ($variables as $env => $config) {
51
-            $value = (string) config($config);
51
+            $value = (string)config($config);
52 52
             if ('' === $value) {
53 53
                 echo sprintf('Please set a valid value for "%s" in the env file.', $env);
54 54
                 app('artisan')->call('config:clear');
Please login to merge, or discard this patch.