@@ -10,7 +10,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | // persist the products |
| 88 | 88 | foreach ($request->products as $f => $product) { |
| 89 | - $productType = match ($product['type']) { |
|
| 89 | + $productType = match($product['type']) { |
|
| 90 | 90 | 'enrollment' => Enrollment::class, |
| 91 | 91 | 'scheduledPayment' => Enrollment::class, |
| 92 | 92 | 'fee' => Fee::class, |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | Payment::create([ |
| 156 | 156 | 'responsable_id' => backpack_user()->id, |
| 157 | 157 | 'invoice_id' => $invoice->id, |
| 158 | - 'payment_method' => isset($payment['method']) ? $payment['method'] : null , |
|
| 158 | + 'payment_method' => isset($payment['method']) ? $payment['method'] : null, |
|
| 159 | 159 | 'value' => $payment['value'], |
| 160 | 160 | 'date' => isset($payment['date']) ? Carbon::parse($payment['date']) : Carbon::now(), |
| 161 | 161 | ]); |
@@ -19,7 +19,7 @@ |
||
| 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'), |
@@ -32,7 +32,7 @@ |
||
| 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 | |
@@ -17,10 +17,9 @@ |
||
| 17 | 17 | public $firstname; |
| 18 | 18 | public $listId; |
| 19 | 19 | |
| 20 | - public function __construct(Student|Contact $user, $listId = null) |
|
| 20 | + public function __construct(Student | Contact $user, $listId = null) |
|
| 21 | 21 | { |
| 22 | - $listId = $listId ? $listId : |
|
| 23 | - $this->email = $user->email; |
|
| 22 | + $listId = $listId ? $listId : $this->email = $user->email; |
|
| 24 | 23 | $this->name = $user->firstname; |
| 25 | 24 | $this->lastname = $user->lastname; |
| 26 | 25 | $this->listId = $listId; |
@@ -24,6 +24,6 @@ |
||
| 24 | 24 | |
| 25 | 25 | public function build() |
| 26 | 26 | { |
| 27 | - return $this->subject('Facturation ' . $this->data['partner_name'])->view('emails.external_courses_report'); |
|
| 27 | + return $this->subject('Facturation '.$this->data['partner_name'])->view('emails.external_courses_report'); |
|
| 28 | 28 | } |
| 29 | 29 | } |
@@ -32,7 +32,7 @@ |
||
| 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') |
@@ -20,7 +20,7 @@ discard block |
||
| 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 |
||
| 61 | 61 | */ |
| 62 | 62 | protected function gate() |
| 63 | 63 | { |
| 64 | - Gate::define('viewTelescope', function ($user = null) { |
|
| 64 | + Gate::define('viewTelescope', function($user = null) { |
|
| 65 | 65 | return backpack_user() && backpack_user()->email === config('app.admin_email'); |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -46,8 +46,7 @@ discard block |
||
| 46 | 46 | 'preciototal' => $product->final_price, |
| 47 | 47 | 'valoriva' => 0, |
| 48 | 48 | ]; |
| 49 | - } |
|
| 50 | - elseif ($product->product instanceof Fee) |
|
| 49 | + } elseif ($product->product instanceof Fee) |
|
| 51 | 50 | { |
| 52 | 51 | $ivkardex[] = [ |
| 53 | 52 | 'codinventario' => $product->product_code, |
@@ -58,8 +57,7 @@ discard block |
||
| 58 | 57 | 'preciototal' => $product->final_price, |
| 59 | 58 | 'valoriva' => 0, |
| 60 | 59 | ]; |
| 61 | - } |
|
| 62 | - elseif ($product->product instanceof Book) |
|
| 60 | + } elseif ($product->product instanceof Book) |
|
| 63 | 61 | { |
| 64 | 62 | $ivkardex[] = [ |
| 65 | 63 | 'codinventario' => $product->product_code, |