@@ -29,7 +29,7 @@ |
||
29 | 29 | '1' => 'Yes', |
30 | 30 | '0' => 'No', |
31 | 31 | ]) |
32 | - ->filter(function (Builder $builder, string $value) { |
|
32 | + ->filter(function(Builder $builder, string $value) { |
|
33 | 33 | if ($value === '1') { |
34 | 34 | $builder->where('is_searchable', true); |
35 | 35 | } elseif ($value === '0') { |
@@ -20,16 +20,16 @@ |
||
20 | 20 | public function mount($event = null) |
21 | 21 | { |
22 | 22 | $this->event = $event; |
23 | - $this->passes = ! is_null($event) ? $event->passes : Pass::orderBy('position')->get(); |
|
23 | + $this->passes = !is_null($event) ? $event->passes : Pass::orderBy('position')->get(); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | public function initializeEventPassChart() |
27 | 27 | { |
28 | 28 | $passes = $this->passes; |
29 | - $total_pass_limit = ! is_null($this->event) ? $this->event->total_limit : (Cache::get('events', Event::orderBy('position')->get()))->reduce(function (int $total, $event) { |
|
29 | + $total_pass_limit = !is_null($this->event) ? $this->event->total_limit : (Cache::get('events', Event::orderBy('position')->get()))->reduce(function(int $total, $event) { |
|
30 | 30 | return $total + $event->total_limit; |
31 | 31 | }, 0); |
32 | - $total_registered_pass = ! is_null($this->event) ? $this->event->passes->count() : Pass::count(); |
|
32 | + $total_registered_pass = !is_null($this->event) ? $this->event->passes->count() : Pass::count(); |
|
33 | 33 | $total_remaining_pass = $total_pass_limit - $total_registered_pass; |
34 | 34 | $this->dispatchBrowserEvent('initializeEventPassChart', [ |
35 | 35 | 'passRegisterPerDay' => (new Statistic)->passRegisterPerDay($passes), |
@@ -18,7 +18,7 @@ |
||
18 | 18 | public function mount($event = null) |
19 | 19 | { |
20 | 20 | $this->event = $event; |
21 | - $this->payments = ! is_null($event) ? $event->payments : Payment::orderBy('position')->get(); |
|
21 | + $this->payments = !is_null($event) ? $event->payments : Payment::orderBy('position')->get(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function initializeEventPaymentChart() |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $this->product = $product; |
19 | 19 | $this->attributes = Attribute::orderBy('position')->get(); |
20 | - if (! is_null($product)) { |
|
20 | + if (!is_null($product)) { |
|
21 | 21 | $product_attributes = []; |
22 | 22 | $this->selected_attribute_ids = $product->attributes->pluck('id')->toArray(); |
23 | 23 | $this->updatedSelectedAttributeIds(); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | '1' => 'Active', |
36 | 36 | '0' => 'Inactive', |
37 | 37 | ]) |
38 | - ->filter(function (Builder $builder, string $value) { |
|
38 | + ->filter(function(Builder $builder, string $value) { |
|
39 | 39 | if ($value === '1') { |
40 | 40 | $builder->where('active', true); |
41 | 41 | } elseif ($value === '0') { |
@@ -89,19 +89,19 @@ discard block |
||
89 | 89 | ->collapseOnTablet(), |
90 | 90 | Column::make('SP', 'selling_price') |
91 | 91 | ->format( |
92 | - fn ($value, $row, Column $column) => ! is_null($row->selling_price) ? (currency().$row->selling_price) : '' |
|
92 | + fn ($value, $row, Column $column) => !is_null($row->selling_price) ? (currency().$row->selling_price) : '' |
|
93 | 93 | ) |
94 | 94 | ->html() |
95 | 95 | ->collapseOnTablet(), |
96 | 96 | Column::make('CP', 'cost_price') |
97 | 97 | ->format( |
98 | - fn ($value, $row, Column $column) => ! is_null($row->cost_price) ? (currency().$row->cost_price) : '' |
|
98 | + fn ($value, $row, Column $column) => !is_null($row->cost_price) ? (currency().$row->cost_price) : '' |
|
99 | 99 | ) |
100 | 100 | ->html() |
101 | 101 | ->collapseOnTablet(), |
102 | 102 | Column::make('Discount', 'discount') |
103 | 103 | ->format( |
104 | - fn ($value, $row, Column $column) => ! is_null($row->discount) ? (currency().$row->discount) : '' |
|
104 | + fn ($value, $row, Column $column) => !is_null($row->discount) ? (currency().$row->discount) : '' |
|
105 | 105 | ) |
106 | 106 | ->html() |
107 | 107 | ->collapseOnTablet(), |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | '1' => 'Active', |
77 | 77 | '0' => 'Inactive', |
78 | 78 | ]) |
79 | - ->filter(function (Builder $builder, string $value) { |
|
79 | + ->filter(function(Builder $builder, string $value) { |
|
80 | 80 | if ($value === '1') { |
81 | 81 | $builder->where('active', true); |
82 | 82 | } elseif ($value === '0') { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | '1' => 'Featured', |
90 | 90 | '0' => 'Not Featured', |
91 | 91 | ]) |
92 | - ->filter(function (Builder $builder, string $value) { |
|
92 | + ->filter(function(Builder $builder, string $value) { |
|
93 | 93 | if ($value === '1') { |
94 | 94 | $builder->where('featured', true); |
95 | 95 | } elseif ($value === '0') { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | '2' => 'Pending', |
105 | 105 | '3' => 'Draft', |
106 | 106 | ]) |
107 | - ->filter(function (Builder $builder, string $value) { |
|
107 | + ->filter(function(Builder $builder, string $value) { |
|
108 | 108 | if ($value === '0') { |
109 | 109 | $builder->where('status', 0); |
110 | 110 | } elseif ($value === '1') { |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | SelectFilter::make('Author') |
119 | 119 | ->options(array_merge([ |
120 | 120 | '' => 'All', |
121 | - ], User::find(array_unique(Post::pluck('id')->toArray()))->mapWithKeys(function ($user) { |
|
121 | + ], User::find(array_unique(Post::pluck('id')->toArray()))->mapWithKeys(function($user) { |
|
122 | 122 | return [$user->id => $user->name]; |
123 | 123 | })->toArray())) |
124 | - ->filter(function (Builder $builder, string $value) { |
|
124 | + ->filter(function(Builder $builder, string $value) { |
|
125 | 125 | $builder->where('user_id', (int) $value); |
126 | 126 | }), |
127 | 127 | ]; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | |
138 | 138 | private function filterByEventId($data) |
139 | 139 | { |
140 | - if (! is_null($this->event_id)) { |
|
140 | + if (!is_null($this->event_id)) { |
|
141 | 141 | $event = Event::find($this->event_id); |
142 | 142 | |
143 | 143 | return $data->whereIn('id', $event->payments->pluck('id')); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | private function filterByPaymentType($data) |
150 | 150 | { |
151 | 151 | $payment_type = $this->payment_type; |
152 | - if (! is_null($payment_type)) { |
|
152 | + if (!is_null($payment_type)) { |
|
153 | 153 | return $data->where('type', $payment_type); |
154 | 154 | } |
155 | 155 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | private function filterByDateMode($data) |
160 | 160 | { |
161 | 161 | $date_mode = $this->date_mode; |
162 | - if (! is_null($date_mode)) { |
|
162 | + if (!is_null($date_mode)) { |
|
163 | 163 | if ($date_mode == 1) { |
164 | 164 | $date = $this->date ?? Carbon::now(); |
165 | 165 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | if ($date_mode == 2) { |
169 | 169 | $start_date = $this->start_date; |
170 | 170 | $end_date = $this->end_date; |
171 | - if (! is_null($start_date) && ! is_null($end_date)) { |
|
171 | + if (!is_null($start_date) && !is_null($end_date)) { |
|
172 | 172 | return $data->whereBetween('created_at', [$start_date, $end_date]); |
173 | 173 | } |
174 | 174 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | { |
184 | 184 | $order_by = $this->order_by; |
185 | 185 | |
186 | - if (! is_null($order_by)) { |
|
186 | + if (!is_null($order_by)) { |
|
187 | 187 | if ($order_by == 1) { |
188 | 188 | return $data->latest(); |
189 | 189 | } elseif ($order_by == 2) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | '1' => 'Active', |
60 | 60 | '0' => 'Inactive', |
61 | 61 | ]) |
62 | - ->filter(function (Builder $builder, string $value) { |
|
62 | + ->filter(function(Builder $builder, string $value) { |
|
63 | 63 | if ($value === '1') { |
64 | 64 | $builder->where('active', true); |
65 | 65 | } elseif ($value === '0') { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | '1' => 'Featured', |
73 | 73 | '0' => 'Not Featured', |
74 | 74 | ]) |
75 | - ->filter(function (Builder $builder, string $value) { |
|
75 | + ->filter(function(Builder $builder, string $value) { |
|
76 | 76 | if ($value === '1') { |
77 | 77 | $builder->where('featured', true); |
78 | 78 | } elseif ($value === '0') { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | '2' => 'Not Started', |
87 | 87 | '3' => 'Finished', |
88 | 88 | ]) |
89 | - ->filter(function (Builder $builder, string $value) { |
|
89 | + ->filter(function(Builder $builder, string $value) { |
|
90 | 90 | if ($value === '1') { |
91 | 91 | $builder->where('status', 1); |
92 | 92 | } elseif ($value === '2') { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | protected function prepareForValidation(): void |
22 | 22 | { |
23 | 23 | $this->merge([ |
24 | - 'slug' => ! is_null($this->name) ? Str::slug($this->name) : null, |
|
24 | + 'slug' => !is_null($this->name) ? Str::slug($this->name) : null, |
|
25 | 25 | ]); |
26 | 26 | } |
27 | 27 |