@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | parent::boot(); |
26 | 26 | |
27 | - static::addGlobalScope('order', function (Builder $builder) { |
|
27 | + static::addGlobalScope('order', function(Builder $builder) { |
|
28 | 28 | $builder->orderBy('year_id')->orderBy('order')->orderBy('id'); |
29 | 29 | }); |
30 | 30 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | public function studentCount($gender = null) |
136 | 136 | { |
137 | - if (in_array($gender, [1,2])) { |
|
137 | + if (in_array($gender, [1, 2])) { |
|
138 | 138 | return DB::table('enrollments') |
139 | 139 | ->join('courses', 'enrollments.course_id', 'courses.id') |
140 | 140 | ->join('students', 'enrollments.student_id', 'students.id') |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | { |
202 | 202 | $period = self::where('id', '<', $this->id)->orderBy('id', 'desc')->first(); |
203 | 203 | |
204 | - if (! $period == null) { |
|
204 | + if (!$period == null) { |
|
205 | 205 | return $period; |
206 | 206 | } else { |
207 | 207 | return self::first(); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | public function getCoursesWithPendingAttendanceAttribute() |
282 | 282 | { |
283 | 283 | // get all courses for period and preload relations |
284 | - $courses = $this->courses()->where(function ($query) { |
|
284 | + $courses = $this->courses()->where(function($query) { |
|
285 | 285 | $query->where('exempt_attendance', '!=', true); |
286 | 286 | $query->where('exempt_attendance', '!=', 1); |
287 | 287 | $query->orWhereNull('exempt_attendance'); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function studentCount($gender = null) |
28 | 28 | { |
29 | - if (in_array($gender, [1,2])) { |
|
29 | + if (in_array($gender, [1, 2])) { |
|
30 | 30 | return DB::table('enrollments') |
31 | 31 | ->join('courses', 'enrollments.course_id', 'courses.id') |
32 | 32 | ->join('periods', 'courses.period_id', 'periods.id') |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $year_data = []; |
64 | 64 | $years = []; // New array |
65 | 65 | |
66 | - if (! isset($request->period)) { |
|
66 | + if (!isset($request->period)) { |
|
67 | 67 | $startperiod = Period::find(Config::where('name', 'first_external_period')->first()->value ?? Period::first()->id); |
68 | 68 | } else { |
69 | 69 | $startperiod = Period::find($request->period); |