Passed
Branch master (8bd484)
by Matt
06:12
created
src/services/LeverService.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 
189 189
             return new LeverJob($responseData);
190 190
         }
191
-        catch(\GuzzleHttp\Exception\RequestException $e) 
191
+        catch (\GuzzleHttp\Exception\RequestException $e) 
192 192
         {
193 193
             if ($e->getCode() === 404)
194 194
             {
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             return false;
268 268
         }
269 269
 
270
-        $event = new ApplyEvent([ 'application' => $application ]);
270
+        $event = new ApplyEvent(['application' => $application]);
271 271
 
272 272
         if ($this->hasEventHandlers(self::EVENT_BEFORE_SEND_APPLICATION))
273 273
         {
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             return true;
283 283
         }
284 284
 
285
-        if ($response = $this->client->post($postUrl, [ 'multipart' => $application->toMultiPartPostData() ]))
285
+        if ($response = $this->client->post($postUrl, ['multipart' => $application->toMultiPartPostData()]))
286 286
         {
287 287
             if ($response->getStatusCode() === 200 && isset($response->getBody()->applicationId))
288 288
             {
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -187,8 +187,7 @@  discard block
 block discarded – undo
187 187
             $responseData = json_decode($response->getBody());
188 188
 
189 189
             return new LeverJob($responseData);
190
-        }
191
-        catch(\GuzzleHttp\Exception\RequestException $e) 
190
+        } catch(\GuzzleHttp\Exception\RequestException $e) 
192 191
         {
193 192
             if ($e->getCode() === 404)
194 193
             {
@@ -294,8 +293,7 @@  discard block
 block discarded – undo
294 293
                 }
295 294
 
296 295
                 return true;
297
-            }
298
-            else
296
+            } else
299 297
             {
300 298
                 $this->errors[] = Craft::t('lever', 'Your application could not be submitted.');
301 299
                 return false;
Please login to merge, or discard this patch.
src/Lever.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         Event::on(
71 71
             CraftVariable::class,
72 72
             CraftVariable::EVENT_INIT,
73
-            function (Event $event) {
73
+            function(Event $event) {
74 74
                 $variable = $event->sender;
75 75
                 $variable->set('lever', LeverVariable::class);
76 76
             }
Please login to merge, or discard this patch.
src/controllers/ApplyController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,13 +44,11 @@
 block discarded – undo
44 44
             if (Lever::$plugin->api->applyForJob($jobId))
45 45
             {
46 46
                 return $this->redirectToPostedUrl();
47
-            }
48
-            else
47
+            } else
49 48
             {
50 49
                 Craft::$app->getSession()->setError(Craft::t('lever', 'Failed to submit job application. Please try again!'));
51 50
             }
52
-        }
53
-        else
51
+        } else
54 52
         {
55 53
             Craft::$app->getSession()->setError(Craft::t('lever', 'Job ID missing.'));
56 54
         }
Please login to merge, or discard this patch.