Passed
Push — master ( 154123...35918c )
by Thomas
05:57
created
app/Http/Controllers/Admin/ResultCrudController.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
53 53
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
54 54
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
55
-                          ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
55
+                            ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
56 56
                         });
57 57
                     });
58 58
                 },
@@ -86,20 +86,20 @@  discard block
 block discarded – undo
86 86
             'name' => 'noresult',
87 87
             'label'=> __('No Result'),
88 88
         ],
89
-          false,
90
-          function () {
91
-              CRUD::addClause('noResult');
92
-          });
89
+            false,
90
+            function () {
91
+                CRUD::addClause('noResult');
92
+            });
93 93
 
94 94
         CRUD::addFilter([
95 95
             'type' => 'simple',
96 96
             'name' => 'hideparents',
97 97
             'label'=> __('Hide Parents'),
98 98
         ],
99
-          false,
100
-          function () {
101
-              CRUD::addClause('real');
102
-          });
99
+            false,
100
+            function () {
101
+                CRUD::addClause('real');
102
+            });
103 103
 
104 104
         CRUD::addFilter([
105 105
             'name' => 'period_id',
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
                 'type' => 'select',
47 47
                 'entity' => 'student', // the method that defines the relationship in your Model
48 48
                 'attribute' => 'name', // foreign key attribute that is shown to user
49
-                'searchLogic' => function ($query, $column, $searchTerm) {
50
-                    $query->orWhereHas('student', function ($q) use ($searchTerm) {
51
-                        $q->WhereHas('user', function ($q) use ($searchTerm) {
49
+                'searchLogic' => function($query, $column, $searchTerm) {
50
+                    $query->orWhereHas('student', function($q) use ($searchTerm) {
51
+                        $q->WhereHas('user', function($q) use ($searchTerm) {
52 52
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
53 53
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
54 54
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             'label'=> __('No Result'),
88 88
         ],
89 89
           false,
90
-          function () {
90
+          function() {
91 91
               CRUD::addClause('noResult');
92 92
           });
93 93
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             'label'=> __('Hide Parents'),
98 98
         ],
99 99
           false,
100
-          function () {
100
+          function() {
101 101
               CRUD::addClause('real');
102 102
           });
103 103
 
@@ -105,20 +105,20 @@  discard block
 block discarded – undo
105 105
             'name' => 'period_id',
106 106
             'type' => 'select2',
107 107
             'label'=> __('Period'),
108
-        ], function () {
108
+        ], function() {
109 109
             return Period::all()->pluck('name', 'id')->toArray();
110
-        }, function ($value) { // if the filter is active
110
+        }, function($value) { // if the filter is active
111 111
             CRUD::addClause('period', $value);
112 112
         });
113 113
 
114
-        CRUD::addFilter([ // select2_multiple filter
114
+        CRUD::addFilter([// select2_multiple filter
115 115
             'name' => 'result',
116 116
             'type' => 'select2',
117 117
             'label'=> __('Result'),
118
-        ], function () { // the options that show up in the select2
118
+        ], function() { // the options that show up in the select2
119 119
             return ResultType::all()->pluck('name', 'id')->toArray();
120
-        }, function ($value) { // if the filter is active
121
-            $this->crud->query = $this->crud->query->whereHas('result', function ($query) use ($value) {
120
+        }, function($value) { // if the filter is active
121
+            $this->crud->query = $this->crud->query->whereHas('result', function($query) use ($value) {
122 122
                 $query->where('result_type_id', $value);
123 123
             });
124 124
         });
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LeaveCrudController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -75,20 +75,20 @@
 block discarded – undo
75 75
         }, function ($value) { // if the filter is active
76 76
             CRUD::addClause('where', 'teacher_id', $value);
77 77
         },
78
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
79
-          });
78
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
79
+            });
80 80
 
81 81
         CRUD::addFilter([ // daterange filter
82 82
             'type' => 'date_range',
83 83
             'name' => 'from_to',
84 84
             'label'=> __('Date range'),
85 85
         ],
86
-          false,
87
-          function ($value) { // if the filter is active, apply these constraints
88
-              $dates = json_decode($value);
89
-              CRUD::addClause('where', 'date', '>=', $dates->from);
90
-              CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
91
-          });
86
+            false,
87
+            function ($value) { // if the filter is active, apply these constraints
88
+                $dates = json_decode($value);
89
+                CRUD::addClause('where', 'date', '>=', $dates->from);
90
+                CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
91
+            });
92 92
     }
93 93
 
94 94
     protected function setupCreateOperation()
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,25 +66,25 @@  discard block
 block discarded – undo
66 66
             ],
67 67
         ]);
68 68
 
69
-        CRUD::addFilter([ // select2 filter
69
+        CRUD::addFilter([// select2 filter
70 70
             'name' => 'teacher_id',
71 71
             'type' => 'select2',
72 72
             'label'=> __('Teacher'),
73
-        ], function () {
73
+        ], function() {
74 74
             return \App\Models\Teacher::all()->pluck('name', 'id')->toArray();
75
-        }, function ($value) { // if the filter is active
75
+        }, function($value) { // if the filter is active
76 76
             CRUD::addClause('where', 'teacher_id', $value);
77 77
         },
78
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
78
+          function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
79 79
           });
80 80
 
81
-        CRUD::addFilter([ // daterange filter
81
+        CRUD::addFilter([// daterange filter
82 82
             'type' => 'date_range',
83 83
             'name' => 'from_to',
84 84
             'label'=> __('Date range'),
85 85
         ],
86 86
           false,
87
-          function ($value) { // if the filter is active, apply these constraints
87
+          function($value) { // if the filter is active, apply these constraints
88 88
               $dates = json_decode($value);
89 89
               CRUD::addClause('where', 'date', '>=', $dates->from);
90 90
               CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 'model' => \App\Models\LeaveType::class, // foreign key model
117 117
             ],
118 118
 
119
-            [   // date_range
119
+            [// date_range
120 120
                 'name' => ['start_date', 'end_date'], // db columns for start_date & end_date
121 121
                 'label' => 'Event Date Range',
122 122
                 'type' => 'date_range',
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 'model' => \App\Models\LeaveType::class, // foreign key model
161 161
             ],
162 162
 
163
-            [   // datepicker
163
+            [// datepicker
164 164
                 'name' => 'date',
165 165
                 'label' => 'Event Date',
166 166
                 'type' => 'date',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EventCrudController.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -110,39 +110,39 @@  discard block
 block discarded – undo
110 110
             'name' => 'from_to',
111 111
             'label'=> __('Date range'),
112 112
         ],
113
-          false,
114
-          function ($value) { // if the filter is active, apply these constraints
115
-              $dates = json_decode($value);
116
-
117
-              if ($dates->from) {
118
-                  CRUD::addClause('where', 'start', '>=', $dates->from);
119
-              }
120
-              if ($dates->to) {
121
-                  CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59');
122
-              }
123
-          });
113
+            false,
114
+            function ($value) { // if the filter is active, apply these constraints
115
+                $dates = json_decode($value);
116
+
117
+                if ($dates->from) {
118
+                    CRUD::addClause('where', 'start', '>=', $dates->from);
119
+                }
120
+                if ($dates->to) {
121
+                    CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59');
122
+                }
123
+            });
124 124
 
125 125
         CRUD::addFilter([
126 126
             'type' => 'simple',
127 127
             'name' => 'orphan',
128 128
             'label'=> __('Events with no course'),
129 129
         ],
130
-          false,
131
-          function ($value) { // if the filter is active, apply these constraints
132
-              $this->crud->query->where('course_id', null);
133
-          },
134
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
135
-          });
130
+            false,
131
+            function ($value) { // if the filter is active, apply these constraints
132
+                $this->crud->query->where('course_id', null);
133
+            },
134
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
135
+            });
136 136
 
137 137
         CRUD::addFilter([
138 138
             'type' => 'simple',
139 139
             'name' => 'unassigned',
140 140
             'label'=> __('Events with no teacher'),
141 141
         ],
142
-          false,
143
-          function ($value) { // if the filter is active, apply these constraints
144
-              $this->crud->query->where('teacher_id', null);
145
-          });
142
+            false,
143
+            function ($value) { // if the filter is active, apply these constraints
144
+                $this->crud->query->where('teacher_id', null);
145
+            });
146 146
 
147 147
         CRUD::addFilter([ // select2 filter
148 148
             'name' => 'teacher_id',
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
         }, function ($value) { // if the filter is active
154 154
             CRUD::addClause('where', 'teacher_id', $value);
155 155
         },
156
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
157
-          });
156
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
157
+            });
158 158
     }
159 159
 
160 160
     public function store(Request $request)
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 
106 106
         ]);
107 107
 
108
-        CRUD::addFilter([ // daterange filter
108
+        CRUD::addFilter([// daterange filter
109 109
             'type' => 'date_range',
110 110
             'name' => 'from_to',
111 111
             'label'=> __('Date range'),
112 112
         ],
113 113
           false,
114
-          function ($value) { // if the filter is active, apply these constraints
114
+          function($value) { // if the filter is active, apply these constraints
115 115
               $dates = json_decode($value);
116 116
 
117 117
               if ($dates->from) {
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
             'label'=> __('Events with no course'),
129 129
         ],
130 130
           false,
131
-          function ($value) { // if the filter is active, apply these constraints
131
+          function($value) { // if the filter is active, apply these constraints
132 132
               $this->crud->query->where('course_id', null);
133 133
           },
134
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
134
+          function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
135 135
           });
136 136
 
137 137
         CRUD::addFilter([
@@ -140,20 +140,20 @@  discard block
 block discarded – undo
140 140
             'label'=> __('Events with no teacher'),
141 141
         ],
142 142
           false,
143
-          function ($value) { // if the filter is active, apply these constraints
143
+          function($value) { // if the filter is active, apply these constraints
144 144
               $this->crud->query->where('teacher_id', null);
145 145
           });
146 146
 
147
-        CRUD::addFilter([ // select2 filter
147
+        CRUD::addFilter([// select2 filter
148 148
             'name' => 'teacher_id',
149 149
             'type' => 'select2',
150 150
             'label'=> __('Teacher'),
151
-        ], function () {
151
+        ], function() {
152 152
             return \App\Models\Teacher::all()->pluck('name', 'id')->toArray();
153
-        }, function ($value) { // if the filter is active
153
+        }, function($value) { // if the filter is active
154 154
             CRUD::addClause('where', 'teacher_id', $value);
155 155
         },
156
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
156
+          function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
157 157
           });
158 158
     }
159 159
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EnrollmentCrudController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -136,11 +136,11 @@
 block discarded – undo
136 136
         ], function () {
137 137
             return EnrollmentStatusType::all()->pluck('name', 'id')->toArray();
138 138
         },
139
-          function ($values) { // if the filter is active
140
-              foreach (json_decode($values) as $key => $value) {
141
-                  CRUD::addClause('orWhere', 'status_id', $value);
142
-              }
143
-          });
139
+            function ($values) { // if the filter is active
140
+                foreach (json_decode($values) as $key => $value) {
141
+                    CRUD::addClause('orWhere', 'status_id', $value);
142
+                }
143
+            });
144 144
 
145 145
         CRUD::addFilter([
146 146
             'name' => 'period_id',
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
                 'name' => 'user.lastname',
70 70
                 'label' => __('Last Name'),
71 71
                 'type' => 'text',
72
-                'searchLogic' => function ($query, $column, $searchTerm) {
73
-                    $query->orWhereHas('student', function ($q) use ($searchTerm) {
74
-                        $q->whereHas('user', function ($q) use ($searchTerm) {
72
+                'searchLogic' => function($query, $column, $searchTerm) {
73
+                    $query->orWhereHas('student', function($q) use ($searchTerm) {
74
+                        $q->whereHas('user', function($q) use ($searchTerm) {
75 75
                             $q->where('lastname', 'like', '%'.$searchTerm.'%');
76 76
                         });
77 77
                     });
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
                 'name' => 'user.firstname',
83 83
                 'label' => __('First Name'),
84 84
                 'type' => 'text',
85
-                'searchLogic' => function ($query, $column, $searchTerm) {
86
-                    $query->orWhereHas('student', function ($q) use ($searchTerm) {
87
-                        $q->whereHas('user', function ($q) use ($searchTerm) {
85
+                'searchLogic' => function($query, $column, $searchTerm) {
86
+                    $query->orWhereHas('student', function($q) use ($searchTerm) {
87
+                        $q->whereHas('user', function($q) use ($searchTerm) {
88 88
                             $q->where('firstname', 'like', '%'.$searchTerm.'%');
89 89
                         });
90 90
                     });
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
             'name' => 'status_id',
134 134
             'type' => 'select2_multiple',
135 135
             'label'=> __('Status'),
136
-        ], function () {
136
+        ], function() {
137 137
             return EnrollmentStatusType::all()->pluck('name', 'id')->toArray();
138 138
         },
139
-          function ($values) { // if the filter is active
139
+          function($values) { // if the filter is active
140 140
               foreach (json_decode($values) as $key => $value) {
141 141
                   CRUD::addClause('orWhere', 'status_id', $value);
142 142
               }
@@ -146,9 +146,9 @@  discard block
 block discarded – undo
146 146
             'name' => 'period_id',
147 147
             'type' => 'select2',
148 148
             'label'=> __('Period'),
149
-        ], function () {
149
+        ], function() {
150 150
             return Period::all()->pluck('name', 'id')->toArray();
151
-        }, function ($value) { // if the filter is active
151
+        }, function($value) { // if the filter is active
152 152
             CRUD::addClause('period', $value);
153 153
         });
154 154
     }
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
      */
30 30
     protected function schedule(Schedule $schedule)
31 31
     {
32
-        $schedule->call(function () {
32
+        $schedule->call(function() {
33 33
             Log::info('Sending attendance reminders');
34 34
             (new Attendance)->remindPendingAttendance();
35 35
         })->dailyAt('08:15');
36 36
 
37
-        $schedule->call(function () {
37
+        $schedule->call(function() {
38 38
             Log::info('Checking default periods');
39 39
 
40 40
             // when we finish the current period; remove the manual override to automatically fallbackto the next one
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Providers/TelescopeServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $this->hideSensitiveRequestDetails();
22 22
 
23
-        Telescope::filter(function (IncomingEntry $entry) {
23
+        Telescope::filter(function(IncomingEntry $entry) {
24 24
             if ($this->app->isLocal()) {
25 25
                 return true;
26 26
             }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function gate()
63 63
     {
64
-        Gate::define('viewTelescope', function ($user) {
64
+        Gate::define('viewTelescope', function($user) {
65 65
             return in_array($user->email, [
66 66
                 //
67 67
             ]);
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         }
38 38
 
39 39
         View::composer(
40
-            ['partials.create_new_contact', 'students.edit-contact'], function ($view) {
40
+            ['partials.create_new_contact', 'students.edit-contact'], function($view) {
41 41
                 $view->with('contact_types', ContactRelationship::all());
42 42
             });
43 43
     }
Please login to merge, or discard this patch.
app/Providers/AuthServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
          * a user is allowed to view the course attendance sheet if they are the teacher for this course,
30 30
          * or if they have explicit permission to view all course attendance sheets
31 31
          */
32
-        Gate::define('view-course-attendance', function ($user, $course) {
32
+        Gate::define('view-course-attendance', function($user, $course) {
33 33
             return ($user->teacher_id == $course->teacher_id) || $user->can('attendance.view');
34 34
         });
35 35
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
          * if they are the teacher for this course,
39 39
          * or if they have explicit permission to view all event attendance sheets
40 40
          */
41
-        Gate::define('view-event-attendance', function ($user, $event) {
41
+        Gate::define('view-event-attendance', function($user, $event) {
42 42
             return $event->teacher_id == $user->teacher_id || $event->course->teacher_id == $user->teacher_id || $user->can('attendance.view');
43 43
         });
44 44
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
          * if they are the teacher for the course,
48 48
          * or if they have explicit permission to edit any attendance sheets
49 49
          */
50
-        Gate::define('edit-attendance', function ($user, $event) {
50
+        Gate::define('edit-attendance', function($user, $event) {
51 51
             return $event->teacher_id == $user->teacher_id || $event->course->teacher_id == $user->teacher_id || $user->can('attendance.edit');
52 52
         });
53 53
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
          * teachers are allowed to view their own calendar,
56 56
          * and users with explicit permission can view all calendars
57 57
          */
58
-        Gate::define('view-teacher-calendar', function ($user, $teacher) {
58
+        Gate::define('view-teacher-calendar', function($user, $teacher) {
59 59
             return $user->teacher_id == $teacher->id || $user->can('calendars.view');
60 60
         });
61 61
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          * teachers are allowed to view their own courses,
64 64
          * and users with explicit permission can view all courses
65 65
          */
66
-        Gate::define('view-course', function ($user, $course) {
66
+        Gate::define('view-course', function($user, $course) {
67 67
             return $user->teacher_id == $course->teacher_id || $user->can('courses.view');
68 68
         });
69 69
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
          * if they are a teacher
73 73
          * of if they have explicit permission to view any result
74 74
          */
75
-        Gate::define('view-enrollment', function ($user, $enrollment) {
75
+        Gate::define('view-enrollment', function($user, $enrollment) {
76 76
             return $user->student_id == $enrollment->student_id || $user->isTeacher() || $user->can('evaluation.view');
77 77
         });
78 78
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
          * if the user is the teacher of the course
81 81
          * of if they have explicit permission to enroll students
82 82
          */
83
-        Gate::define('enroll-in-course', function ($user, $course) {
83
+        Gate::define('enroll-in-course', function($user, $course) {
84 84
             return ($course->teacher_id == $user->teacher_id) || $user->can('enrollments.edit');
85 85
         });
86 86
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
          * if the user is a teacher
89 89
          * of if they have explicit permission to enroll students
90 90
          */
91
-        Gate::define('enroll-students', function ($user) {
91
+        Gate::define('enroll-students', function($user) {
92 92
             return $user->isTeacher() || $user->can('enrollments.edit');
93 93
         });
94 94
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
          * teachers are allowed to view their own hours,
97 97
          * and users with explicit permission can view all hours
98 98
          */
99
-        Gate::define('view-teacher-hours', function ($user, $teacher) {
99
+        Gate::define('view-teacher-hours', function($user, $teacher) {
100 100
             return $user->teacher_id == $teacher->id || $user->can('hr.view');
101 101
         });
102 102
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
          * teachers are allowed to edit results for their own students
105 105
          * as well as users with explicit permission to edit any result
106 106
          */
107
-        Gate::define('edit-result', function ($user, $enrollment) {
107
+        Gate::define('edit-result', function($user, $enrollment) {
108 108
             return $user->teacher_id == $enrollment->course->teacher_id || $user->can('evaluation.edit');
109 109
         });
110 110
     }
Please login to merge, or discard this patch.