Passed
Push — task/comments-api ( 19d8e5...25ff28 )
by Chris
45:14 queued 36:01
created
app/Console/Kernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         // search $needle in process status
61 61
         $result = array_filter(
62 62
             $process_status,
63
-            function ($var) use ($needle) {
63
+            function($var) use ($needle) {
64 64
                 return strpos($var, $needle);
65 65
             }
66 66
         );
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 'user' => request()->user(),
69 69
                 'requestUrl' => request()->url()
70 70
             ];
71
-            $message = '419 CSRF Token Mismatch. ' . collect($logData)->toJson();
71
+            $message = '419 CSRF Token Mismatch. '.collect($logData)->toJson();
72 72
             Log::debug($message);
73 73
         }
74 74
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             return $exception->render($request);
110 110
         }
111 111
         if ($exception instanceof TokenMismatchException) {
112
-            $newMessage = $exception->getMessage() . ' ' . Lang::get('errors.refresh_page');
112
+            $newMessage = $exception->getMessage().' '.Lang::get('errors.refresh_page');
113 113
             $modifiedException = new TokenMismatchException($newMessage, $exception->getCode(), $exception);
114 114
             return parent::render($request, $modifiedException);
115 115
         }
Please login to merge, or discard this patch.
app/Http/Requests/StoreRatingGuideAnswer.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
     {
20 20
         // Ensure the user can make answers, question exists, and user is the owner of the question it answers.
21 21
         if ($this->user()->can('create', RatingGuideAnswer::class)) {
22
-            $questionId = (int) $this->input('rating_guide_question_id');
22
+            $questionId = (int)$this->input('rating_guide_question_id');
23 23
             if ($questionId) {
24 24
                 $question = RatingGuideQuestion::find($questionId);
25 25
                 return $question && $this->user()->can('update', $question);
Please login to merge, or discard this patch.
app/Http/Requests/SkillCrudRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function rules() : array
26 26
     {
27 27
         return [
28
-            'name' => 'required|unique_translation:skills,name' . (isset($this->id) ? ",{$this->id}" : ''),
28
+            'name' => 'required|unique_translation:skills,name'.(isset($this->id) ? ",{$this->id}" : ''),
29 29
             'description' => 'required',
30 30
             'skill_type_id' => 'exists:skill_types,id'
31 31
         ];
Please login to merge, or discard this patch.
app/Http/Controllers/ApplicantProfileController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $validator->validate($request->all());
133 133
 
134 134
         foreach ($questions as $question) {
135
-            $answerName = $this->answerFormInputName . '.' . $question->id;
135
+            $answerName = $this->answerFormInputName.'.'.$question->id;
136 136
             if ($request->has($answerName)) {
137 137
                 $answer = ApplicantProfileAnswer::where(
138 138
                     [
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                 )->first();
143 143
                 if ($answer == null) {
144 144
                     $answer = new ApplicantProfileAnswer();
145
-                    $answer->applicant_id =$applicant->id;
145
+                    $answer->applicant_id = $applicant->id;
146 146
                     $answer->applicant_profile_question_id = $question->id;
147 147
                 }
148 148
                 $answer->answer = $request->input($answerName);
Please login to merge, or discard this patch.
app/Services/Validation/Rules/TwitterHandleRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function passes($attribute, $value)
25 25
     {
26
-        return preg_match('/' . self::PATTERN . '/', $value);
26
+        return preg_match('/'.self::PATTERN.'/', $value);
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
app/Models/HrAdvisor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     public function getNameAttribute(): string
77 77
     {
78 78
         if ($this->user !== null) {
79
-            return $this->user->first_name . ' ' . $this->user->last_name;
79
+            return $this->user->first_name.' '.$this->user->last_name;
80 80
         }
81 81
         return '';
82 82
     }
Please login to merge, or discard this patch.
routes/web.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
         'prefix' => LaravelLocalization::setLocale(),
19 19
         'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']
20 20
     ],
21
-    function () : void {
21
+    function() : void {
22 22
         /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
23 23
 
24
-        Route::group(['prefix' => 'demo'], function () : void {
24
+        Route::group(['prefix' => 'demo'], function() : void {
25 25
 
26 26
             /* Temporary Blog Index */
27 27
             Route::view('blog', 'common/blog-index')->middleware('localOnly')->name('blog');
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         });
52 52
 
53 53
 
54
-        Route::group(['prefix' => config('app.applicant_prefix')], function () : void {
54
+        Route::group(['prefix' => config('app.applicant_prefix')], function() : void {
55 55
 
56 56
             /* Home */
57 57
             Route::get('/', 'HomepageController@applicant')->name('home');
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 ->name('jobs.show');
65 65
 
66 66
             /* Require being logged in */
67
-            Route::middleware(['auth'])->group(function () : void {
67
+            Route::middleware(['auth'])->group(function() : void {
68 68
                 /* Managers */
69 69
                 Route::get('managers/{manager}', 'ManagerProfileController@show')
70 70
                     ->middleware('can:view,manager')
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             });
73 73
 
74 74
             /* Require being logged in as applicant */
75
-            Route::middleware(['auth', 'role:applicant'])->group(function () : void {
75
+            Route::middleware(['auth', 'role:applicant'])->group(function() : void {
76 76
 
77 77
             // Application permissions are handled within the controller instead of with middleware
78 78
                 /* Applications */
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 
208 208
         Route::group([
209 209
             'prefix' => config('app.manager_prefix'),
210
-        ], function (): void {
210
+        ], function(): void {
211 211
 
212
-            Route::middleware(['finishManagerRegistration'])->group(function (): void {
212
+            Route::middleware(['finishManagerRegistration'])->group(function(): void {
213 213
 
214 214
                 /* Home */
215 215
                 Route::get('/', 'HomepageController@manager')->name('manager.home');
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                     'ManagerProfileController@faq'
226 226
                 )->name('manager.faq.section');
227 227
 
228
-                Route::middleware(['auth', 'role:manager'])->group(function (): void {
228
+                Route::middleware(['auth', 'role:manager'])->group(function(): void {
229 229
 
230 230
                     Route::get('profile', 'ManagerProfileController@editAuthenticated')->name('manager.profile');
231 231
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
             });
323 323
 
324 324
             // These routes must be excluded from the finishManagerRegistration middleware to avoid an infinite loop of redirects
325
-            Route::middleware(['auth', 'role:manager'])->group(function (): void {
325
+            Route::middleware(['auth', 'role:manager'])->group(function(): void {
326 326
                 Route::get('first-visit', 'Auth\FirstVisitController@showFirstVisitManagerForm')
327 327
                     ->name('manager.first_visit');
328 328
                 Route::post('finish_registration', 'Auth\FirstVisitController@finishManagerRegistration')
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         /* AJAX calls =============================================================== */
349 349
 
350 350
         /* Require being logged in */
351
-        Route::middleware(['auth'])->group(function () : void {
351
+        Route::middleware(['auth'])->group(function() : void {
352 352
 
353 353
             Route::delete('courses/{course}', 'CourseController@destroy')
354 354
                 ->middleware('can:delete,course')
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
                 'prefix' => 'admin',
414 414
                 'middleware' => ['auth', 'role:admin']
415 415
             ],
416
-            function (): void {
416
+            function(): void {
417 417
                 /* Edit Job */
418 418
                 Route::get('jobs/{jobPoster}/edit', 'JobController@edit')
419 419
                     ->where('jobPoster', '[0-9]+')
@@ -430,15 +430,15 @@  discard block
 block discarded – undo
430 430
 
431 431
         Route::group([
432 432
             'prefix' => config('app.hr_prefix'),
433
-        ], function (): void {
433
+        ], function(): void {
434 434
 
435
-            Route::middleware(['finishHrRegistration'])->group(function (): void {
435
+            Route::middleware(['finishHrRegistration'])->group(function(): void {
436 436
 
437 437
                 Route::get('/', 'HomepageController@hr_advisor')->name('hr_advisor.home');
438 438
             });
439 439
 
440 440
             // These routes must be excluded from the finishHrAdvisorRegistration middleware to avoid an infinite loop of redirects
441
-            Route::middleware(['auth', 'role:hr_advisor'])->group(function (): void {
441
+            Route::middleware(['auth', 'role:hr_advisor'])->group(function(): void {
442 442
                 Route::get('first-visit', 'Auth\FirstVisitController@showFirstVisitHrForm')
443 443
                     ->name('hr_advisor.first_visit');
444 444
                 Route::post('finish_registration', 'Auth\FirstVisitController@finishHrRegistration')
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
         'prefix' => 'admin',
470 470
         'middleware' => ['auth', 'role:admin']
471 471
     ],
472
-    function (): void {
472
+    function(): void {
473 473
         // This page is non-localized, because the middleware that redirects to localized pages changes POSTs to GETs and messes up the request.
474 474
         Route::post('jobs/create/as-manager/{manager}', 'JobController@createAsManager')
475 475
             ->middleware('can:create,App\Models\JobPoster')
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 
484 484
 
485 485
 /** API routes - currently using same default http auth, but not localized */
486
-Route::group(['prefix' => 'api'], function (): void {
486
+Route::group(['prefix' => 'api'], function(): void {
487 487
     // Protected by a gate in the controller, instead of policy middleware
488 488
     Route::get('jobs/{jobPoster}/assessment-plan', 'AssessmentPlanController@getForJob');
489 489
     // Public, not protected by policy or gate
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
         ->name('api.jobs.submit');
529 529
     Route::resource('jobs', 'Api\JobApiController')->only([
530 530
         'show', 'store', 'update'
531
-    ])->names([ // Specify custom names because default names collied with existing routes.
531
+    ])->names([// Specify custom names because default names collied with existing routes.
532 532
         'show' => 'api.jobs.show',
533 533
         'store' => 'api.jobs.store',
534 534
         'update' => 'api.jobs.update'
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 
537 537
     Route::resource('managers', 'Api\ManagerApiController')->only([
538 538
         'show', 'update'
539
-    ])->names([ // Specify custom names because default names collied with existing routes
539
+    ])->names([// Specify custom names because default names collied with existing routes
540 540
         'show' => 'api.managers.show',
541 541
         'update' => 'api.managers.update'
542 542
     ]);
Please login to merge, or discard this patch.
app/Http/Controllers/Api/CommentController.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function indexByJob(JobPoster $jobPoster)
22 22
     {
23
-          $comments = Comment::where('job_poster_id', $jobPoster->id)->get();
24
-          return response()->json(new ResourceCollection($comments));
23
+            $comments = Comment::where('job_poster_id', $jobPoster->id)->get();
24
+            return response()->json(new ResourceCollection($comments));
25 25
     }
26 26
 
27 27
     /**
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function store(StoreComment $request)
34 34
     {
35
-          $data = $request->validated();
36
-          $comment = new Comment();
37
-          $comment->fill($data);
38
-          $comment->save();
39
-          return response()->json(new JsonResource($comment));
35
+            $data = $request->validated();
36
+            $comment = new Comment();
37
+            $comment->fill($data);
38
+            $comment->save();
39
+            return response()->json(new JsonResource($comment));
40 40
     }
41 41
 }
Please login to merge, or discard this patch.