Passed
Push — master ( d700b0...2a2eb6 )
by Thomas
12:55 queued 10s
created
app/Http/Controllers/CourseSkillController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
 
136 136
     public function import(Course $course, Request $request)
137 137
     {
138
-        if (! $request->hasFile('skillset')) {
138
+        if (!$request->hasFile('skillset')) {
139 139
             abort(422, 'No file has been uploaded');
140 140
         }
141 141
 
Please login to merge, or discard this patch.
app/Http/Controllers/TeacherCalendarController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         $teachers = Teacher::with('user')->get()->toArray();
27 27
 
28
-        $teachers = array_map(function ($teacher) {
28
+        $teachers = array_map(function($teacher) {
29 29
             return [
30 30
                 'id' => $teacher['id'],
31 31
                 'title' => $teacher['user']['firstname'],
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         array_push($teachers, ['id' => 'tbd', 'title' => 'Unassigned']);
36 36
 
37
-        $events = array_map(function ($event) {
37
+        $events = array_map(function($event) {
38 38
             return [
39 39
                 'title' => $event['name'],
40 40
                 'resourceId' => $event['teacher_id'],
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $unassigned_events = Event::where('teacher_id', null)->get()->toArray();
50 50
 
51
-        $unassigned_events = array_map(function ($event) {
51
+        $unassigned_events = array_map(function($event) {
52 52
             return [
53 53
                 'title' => $event['name'],
54 54
                 'resourceId' => 'tbd',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         $leaves = Leave::orderBy('date', 'desc')->limit(10000)->get()->toArray();
64 64
 
65
-        $leaves = array_map(function ($event) {
65
+        $leaves = array_map(function($event) {
66 66
             return [
67 67
                 'title' => $event->leaveType->name ?? 'ABS', // todo fix
68 68
                 'resourceId' => $event['teacher_id'],
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         $events = $teacher->events->toArray();
94
-        $events = array_map(function ($event) {
94
+        $events = array_map(function($event) {
95 95
             return [
96 96
                 'title' => $event['name'],
97 97
                 'start' => $event['start'],
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
         }, $events);
103 103
 
104 104
         $leaves = $teacher->leaves->toArray();
105
-        $leaves = array_map(function ($event) {
105
+        $leaves = array_map(function($event) {
106 106
             return [
107
-                'title' => $event->leaveType->name ?? 'vacances',  // todo fix
107
+                'title' => $event->leaveType->name ?? 'vacances', // todo fix
108 108
                 'start' => $event['date'],
109 109
                 'allDay' => true,
110 110
             ];
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/MyAccountController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,8 +226,8 @@
 block discarded – undo
226 226
             $user = Student::where('user_id', $this->guard()->user()->id)->first();
227 227
 
228 228
             $user
229
-               ->addMedia($request->fileToUpload)
230
-               ->toMediaCollection('profile-picture');
229
+                ->addMedia($request->fileToUpload)
230
+                ->toMediaCollection('profile-picture');
231 231
         }
232 232
 
233 233
         // if the user has been selected for a forced update, move to the next step
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,9 +163,9 @@
 block discarded – undo
163 163
         // add photo
164 164
 
165 165
         $student
166
-           ->addMediaFromBase64($request->data['userPicture'])
167
-           ->usingFileName('profilePicture.jpg')
168
-           ->toMediaCollection('profile-picture');
166
+            ->addMediaFromBase64($request->data['userPicture'])
167
+            ->usingFileName('profilePicture.jpg')
168
+            ->toMediaCollection('profile-picture');
169 169
 
170 170
         Log::info('Profile picture added to the student profile');
171 171
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             'profession'                           => 'required',
55 55
             'institution'                          => 'required',
56 56
             'userPicture'                          => 'required',
57
-            function ($attribute, $value, $fail) {
57
+            function($attribute, $value, $fail) {
58 58
                 $size = strlen(base64_decode($value));
59 59
 
60 60
                 if ($size > 3145728) {
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
                 $img = imagecreatefromstring($value);
65 65
 
66
-                if (! $img) {
66
+                if (!$img) {
67 67
                     $fail($attribute.'Invalid image');
68 68
                 }
69 69
 
70 70
                 $size = getimagesizefromstring($value);
71 71
 
72
-                if (! $size || $size[0] == 0 || $size[1] == 0 || ! $size['mime']) {
72
+                if (!$size || $size[0] == 0 || $size[1] == 0 || !$size['mime']) {
73 73
                     $fail($attribute.'is invalid');
74 74
                 }
75 75
             },
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
 
124 124
         // if registration is closed, deny access
125
-        if (! config('backpack.base.registration_open')) {
125
+        if (!config('backpack.base.registration_open')) {
126 126
             abort(403, trans('backpack::base.registration_closed'));
127 127
         }
128 128
 
Please login to merge, or discard this patch.
app/Http/Controllers/GradeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $course = Course::findOrFail($request->input('course_id'));
55 55
         $grade_type = GradeType::findOrFail($request->input('grade_type_id'));
56 56
 
57
-        if (! $course->grade_type->has($grade_type->id)) {
57
+        if (!$course->grade_type->has($grade_type->id)) {
58 58
             $course->grade_type()->attach($grade_type->id);
59 59
         }
60 60
 
Please login to merge, or discard this patch.
app/Http/Controllers/CourseSkillEvaluationController.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
         ->where('course_id', $course->id)
77 77
         ->get();
78 78
 
79
-        $skills = $course->skills->map(function ($skill, $key) use ($student_skills) {
79
+        $skills = $course->skills->map(function($skill, $key) use ($student_skills) {
80 80
             $skill['status'] = $student_skills->where('skill_id', $skill->id)->first()->skill_scale_id ?? null;
81 81
 
82 82
             return $skill;
Please login to merge, or discard this patch.
app/Http/Controllers/ReportController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         $period = Period::get_default_period();
40 40
 
41
-        if (! isset($request->period)) {
41
+        if (!isset($request->period)) {
42 42
             $startperiod = Period::find(Config::where('name', 'first_period')->first()->value);
43 43
         } else {
44 44
             $startperiod = Period::find($request->period);
Please login to merge, or discard this patch.
app/Http/Controllers/ContactController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public function update(Contact $contact, Request $request)
58 58
     {
59 59
         // check if the user is allowed to edit the contact
60
-        if (! backpack_user()->can('update', $contact)) {
60
+        if (!backpack_user()->can('update', $contact)) {
61 61
             abort(403);
62 62
         }
63 63
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function edit(Contact $contact)
96 96
     {
97 97
         // check if the user is allowed to edit the contact
98
-        if (! backpack_user()->can('update', $contact)) {
98
+        if (!backpack_user()->can('update', $contact)) {
99 99
             abort(403);
100 100
         }
101 101
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/GradeTypeCrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         CRUD::addFields([
55 55
             ['name' => 'name', 'label' => 'Name', 'type' => 'text'],
56 56
             ['name' => 'total', 'label' => 'Total', 'type' => 'text'],
57
-            [  // Select
57
+            [// Select
58 58
                 'label'     => 'Category',
59 59
                 'type'      => 'select',
60 60
                 'name'      => 'grade_type_category_id', // the db column for the foreign key
Please login to merge, or discard this patch.