Passed
Pull Request — master (#266)
by
unknown
05:16
created
app/Models/Course.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function skills()
311 311
     {
312
-        return $this->evaluationType?->skills()->orderBy('order');
312
+        return $this->evaluationType ? ->skills()->orderBy('order');
313 313
     }
314 314
 
315 315
     public function books()
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      */
335 335
     public function getPendingAttendanceAttribute()
336 336
     {
337
-        $events = Event::where(function ($query) {
337
+        $events = Event::where(function($query) {
338 338
             $query->where('course_id', $this->id);
339 339
             $query->where('exempt_attendance', '!=', true);
340 340
             $query->where('exempt_attendance', '!=', 1);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             foreach ($courseTimes as $courseTime) {
472 472
                 $initial = $daysInitials[$courseTime->day];
473 473
 
474
-                if (! isset($parsedCourseTimes[$initial])) {
474
+                if (!isset($parsedCourseTimes[$initial])) {
475 475
                     $parsedCourseTimes[$initial] = [];
476 476
                 }
477 477
 
@@ -507,12 +507,12 @@  discard block
 block discarded – undo
507 507
         }
508 508
 
509 509
         // handle for case Mon - Friday 9:00am - 5:00pm but on the Wed 10:00am - 2:00pm, so will split up like so [Mon - Tue 9:00am - 5:00pm | Wed 10:00am -2:00pm | Thur - Friday 9:00am - 5:00pm]
510
-        $result = collect($parsed)->map(function ($value) {
510
+        $result = collect($parsed)->map(function($value) {
511 511
             $value = collect($value);
512 512
             $day = $value->first()['day'];
513 513
             $times = $value->first()['time'];
514 514
             if ($value->count() > 1) {
515
-                $day .= ' - ' . $value->last()['day'];
515
+                $day .= ' - '.$value->last()['day'];
516 516
             }
517 517
 
518 518
             return "$day $times";
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
     public function getCourseTeacherNameAttribute()
549 549
     {
550 550
         if ($this->teacher_id) {
551
-            return $this->teacher?->name;
551
+            return $this->teacher ? ->name;
552 552
         } else {
553 553
             return '-';
554 554
         }
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 
562 562
     public function getDescriptionAttribute()
563 563
     {
564
-        return '[' . $this->course_period_name . '] - ' . $this->name;
564
+        return '['.$this->course_period_name.'] - '.$this->name;
565 565
     }
566 566
 
567 567
     public function getChildrenCountAttribute()
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 
583 583
     public function getAcceptsNewStudentsAttribute(): bool
584 584
     {
585
-        if (! $this->spots || $this->spots == 0) {
585
+        if (!$this->spots || $this->spots == 0) {
586 586
             return true;
587 587
         }
588 588
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 
606 606
     public function eventsWithExpectedAttendance()
607 607
     {
608
-        return $this->events()->where(function ($query) {
608
+        return $this->events()->where(function($query) {
609 609
             $query->where('exempt_attendance', '!=', true);
610 610
             $query->where('exempt_attendance', '!=', 1);
611 611
             $query->orWhereNull('exempt_attendance');
@@ -634,10 +634,10 @@  discard block
 block discarded – undo
634 634
     {
635 635
         if (config('app.currency_position') === 'before')
636 636
         {
637
-            return config('app.currency_symbol') . " ". $this->price;
637
+            return config('app.currency_symbol')." ".$this->price;
638 638
         }
639 639
 
640
-        return $this->price . " " . config('app.currency_symbol');
640
+        return $this->price." ".config('app.currency_symbol');
641 641
     }
642 642
 
643 643
 
Please login to merge, or discard this patch.