Passed
Push — master ( 59f95b...dae6f7 )
by Thomas
12:11
created
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
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             'profession'                           => 'required',
54 54
             'institution'                          => 'required',
55 55
             'userPicture'                          => 'required',
56
-            function ($attribute, $value, $fail) {
56
+            function($attribute, $value, $fail) {
57 57
                 $size = strlen(base64_decode($value));
58 58
 
59 59
                 if ($size > 3145728) {
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 
63 63
                 $img = imagecreatefromstring($value);
64 64
 
65
-                if (! $img) {
65
+                if (!$img) {
66 66
                     $fail($attribute.'Invalid image');
67 67
                 }
68 68
 
69 69
                 $size = getimagesizefromstring($value);
70 70
 
71
-                if (! $size || ($size[0] == 0) || ($size[1] == 0) || ! $size['mime']) {
71
+                if (!$size || ($size[0] == 0) || ($size[1] == 0) || !$size['mime']) {
72 72
                     $fail($attribute.'is invalid');
73 73
                 }
74 74
             },
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
 
123 123
         // if registration is closed, deny access
124
-        if (! config('backpack.base.registration_open')) {
124
+        if (!config('backpack.base.registration_open')) {
125 125
             abort(403, trans('backpack::base.registration_closed'));
126 126
         }
127 127
 
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.
app/Http/Controllers/Admin/Operations/ShowStudentPhotoRosterOperation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $this->crud->allowAccess('showstudentphotoroster');
33 33
         $this->crud->setOperationSetting('setFromDb', true);
34 34
 
35
-        $this->crud->operation('showstudentphotoroster', function () {
35
+        $this->crud->operation('showstudentphotoroster', function() {
36 36
             $this->crud->loadDefaultOperationSettingsFromConfig();
37 37
         });
38 38
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserCrudController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 'label' => trans('backpack::permissionmanager.email'),
42 42
                 'type'  => 'email',
43 43
             ],
44
-            [ // n-n relationship (with pivot table)
44
+            [// n-n relationship (with pivot table)
45 45
                 'label'     => trans('backpack::permissionmanager.roles'), // Table column heading
46 46
                 'type'      => 'select_multiple',
47 47
                 'name'      => 'roles', // the method that defines the relationship in your Model
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
                 'label' => trans('backpack::permissionmanager.role'),
61 61
             ],
62 62
             config('permission.models.role')::all()->pluck('name', 'id')->toArray(),
63
-            function ($value) { // if the filter is active
64
-                $this->crud->addClause('whereHas', 'roles', function ($query) use ($value) {
63
+            function($value) { // if the filter is active
64
+                $this->crud->addClause('whereHas', 'roles', function($query) use ($value) {
65 65
                     $query->where('role_id', '=', $value);
66 66
                 });
67 67
             }
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
     protected function addFields()
115 115
     {
116 116
         $this->crud->addFields([
117
-            [  // Select2
117
+            [// Select2
118 118
                 'label' => trans('firstname'),
119 119
                 'type' => 'text',
120 120
                 'name' => 'firstname',
121 121
             ],
122
-            [  // Select2
122
+            [// Select2
123 123
                 'label' => trans('lastname'),
124 124
                 'type' => 'text',
125 125
                 'name' => 'lastname',
Please login to merge, or discard this patch.