Passed
Push — master ( a643fc...0bc75b )
by Thomas
08:11
created
app/Http/Controllers/ReportController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $year_data = [];
63 63
         $years = []; // New array
64 64
 
65
-        if (! isset($request->period)) {
65
+        if (!isset($request->period)) {
66 66
             $startperiod = Period::find(Config::where('name', 'first_external_period')->first()->value ?? Period::first()->id);
67 67
         } else {
68 68
             $startperiod = Period::find($request->period);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     {
164 164
         $period = Period::get_default_period();
165 165
 
166
-        if (! isset($request->period)) {
166
+        if (!isset($request->period)) {
167 167
             $startperiod = Period::find(Config::where('name', 'first_period')->first()->value);
168 168
         } else {
169 169
             $startperiod = Period::find($request->period);
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EvaluationTypeCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         CRUD::addField(['name' => 'name', 'label' => 'Name', 'type' => 'text']);
37 37
 
38
-        CRUD::addField([    // Select2Multiple = n-n relationship (with pivot table)
38
+        CRUD::addField([// Select2Multiple = n-n relationship (with pivot table)
39 39
             'label'     => __('Grade Types'),
40 40
             'type'      => 'select2_multiple',
41 41
             'name'      => 'gradeTypes', // the method that defines the relationship in your Model
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             'select_all' => true, // show Select All and Clear buttons?
49 49
         ]);
50 50
 
51
-        CRUD::addField([    // Select2Multiple = n-n relationship (with pivot table)
51
+        CRUD::addField([// Select2Multiple = n-n relationship (with pivot table)
52 52
             'label'     => __('Skills'),
53 53
             'type'      => 'select2_multiple',
54 54
             'name'      => 'skills', // the method that defines the relationship in your Model
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
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 'label' => trans('backpack::permissionmanager.email'),
48 48
                 'type'  => 'email',
49 49
             ],
50
-            [ // n-n relationship (with pivot table)
50
+            [// n-n relationship (with pivot table)
51 51
                 'label'     => trans('backpack::permissionmanager.roles'), // Table column heading
52 52
                 'type'      => 'select_multiple',
53 53
                 'name'      => 'roles', // the method that defines the relationship in your Model
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
                 'label' => trans('backpack::permissionmanager.role'),
67 67
             ],
68 68
             config('permission.models.role')::all()->pluck(['name', 'id'])->toArray(),
69
-            function ($value) {
69
+            function($value) {
70 70
                 // if the filter is active
71
-                $this->crud->addClause('whereHas', 'roles', function ($query) use ($value) {
71
+                $this->crud->addClause('whereHas', 'roles', function($query) use ($value) {
72 72
                     $query->where('role_id', '=', $value);
73 73
                 });
74 74
             }
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
     protected function addFields()
120 120
     {
121 121
         $this->crud->addFields([
122
-            [  // Select2
122
+            [// Select2
123 123
                 'label' => trans('firstname'),
124 124
                 'type' => 'text',
125 125
                 'name' => 'firstname',
126 126
             ],
127
-            [  // Select2
127
+            [// Select2
128 128
                 'label' => trans('lastname'),
129 129
                 'type' => 'text',
130 130
                 'name' => 'lastname',
Please login to merge, or discard this patch.
app/Http/Controllers/ConfigController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function get()
12 12
     {
13
-        if (! backpack_user()->hasPermissionTo('courses.edit')) {
13
+        if (!backpack_user()->hasPermissionTo('courses.edit')) {
14 14
             abort(403);
15 15
         }
16 16
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function update(UpdateConfigRequest $request)
25 25
     {
26
-        if (! backpack_user()->hasPermissionTo('courses.edit')) {
26
+        if (!backpack_user()->hasPermissionTo('courses.edit')) {
27 27
             abort(403);
28 28
         }
29 29
 
Please login to merge, or discard this patch.
app/Http/Controllers/LeadStatusController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         // if the sync with external mailing system is enabled
20 20
         if (config('mailing-system.external_mailing_enabled') == true) {
21 21
 
22
-            match ($request->input('status')) {
22
+            match($request->input('status')) {
23 23
                 1 => $listId = config('mailing-system.mailerlite.activeStudentsListId'),
24 24
                 2, 3 => $listId = config('mailing-system.mailerlite.inactiveStudentsListId'),
25 25
                 default => abort(422, 'List ID not found'),
Please login to merge, or discard this patch.
app/Http/Controllers/HRController.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
         $report_end_date = $request->report_end_date ? Carbon::parse($request->report_end_date) : Carbon::parse($period->end);
33 33
 
34 34
         // if we are dealing with a complete period, add theoretical volumes
35
-        if (! $request->report_start_date && ! $request->report_end_date) {
35
+        if (!$request->report_start_date && !$request->report_end_date) {
36 36
             // ensure the report end date is not before the end date to avoid inconsistent results.
37 37
             $report_end_date = $report_start_date->max($report_end_date);
38 38
 
Please login to merge, or discard this patch.
app/Listeners/SendExternalCoursesReport.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
         // foreach partner with an alert set for this day of month
33 33
         foreach (Partner::where('send_report_on', Carbon::now()->day)->get() as $partner) {
34 34
             // get all courses
35
-            $courses = $partner->courses()->whereHas('events', function (Builder $query) use ($period_start, $period_end) {
35
+            $courses = $partner->courses()->whereHas('events', function(Builder $query) use ($period_start, $period_end) {
36 36
                 $query->where('start', '>=', $period_start->toDateString())->where('end', '<=', $period_end->toDateString());
37 37
             })
38 38
             ->with('events')->withCount('events')
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
      */
35 35
     protected function schedule(Schedule $schedule)
36 36
     {
37
-        $schedule->call(function () {
37
+        $schedule->call(function() {
38 38
             Log::info('Sending attendance reminders');
39 39
             $this->remindPendingAttendance();
40 40
         })->dailyAt('08:15');
41 41
 
42
-        $schedule->call(function () {
42
+        $schedule->call(function() {
43 43
             Log::info('Checking default periods');
44 44
 
45 45
             // when we finish the current period; remove the manual override to automatically fallbackto the next one
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
         })->dailyAt('00:00');
58 58
 
59 59
         if (config('settings.partnership_alerts')) {
60
-            $schedule->call(function () {
60
+            $schedule->call(function() {
61 61
                 Log::info('Checking expired partnerships');
62 62
 
63 63
                 // if one of the partnerships is expiring soon, send an email
64
-                $partners = Partner::where(function ($query) {
64
+                $partners = Partner::where(function($query) {
65 65
                     $query->whereNotNull('expired_on')->where('expired_on', '<', Carbon::now()->addDays(28));
66 66
                 })
67
-                    ->where(function ($query) {
67
+                    ->where(function($query) {
68 68
                         $query->whereNull('last_alert_sent_at')->orWhere('last_alert_sent_at', '>', Carbon::now()->subDays(28))->get();
69 69
                     });
70 70
 
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         if (config('settings.external_courses_report')) {
78
-            $schedule->call(function () {
78
+            $schedule->call(function() {
79 79
                 Log::info('Sending external courses reports');
80 80
                 event(new ExternalCoursesReportEvent());
81 81
             })->dailyAt('02:10');
82 82
         }
83 83
 
84 84
         if (config('settings.monthly_report')) {
85
-            $schedule->call(function () {
85
+            $schedule->call(function() {
86 86
                 Log::info('Sending monthly hours report');
87 87
                 event(new MonthlyReportEvent());
88 88
             })->monthlyOn(20);
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.