Skip to content

Commit 3a448ee

Browse files
committed
cs-fixer
1 parent 35d5d45 commit 3a448ee

8 files changed

Lines changed: 54 additions & 54 deletions

File tree

lib/GaletteEvents/Activity.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ public function remove(): bool
150150
$this->zdb->connection->rollBack();
151151
}
152152
Analog::log(
153-
'Unable to delete activity ' . $this->name .
154-
' (' . $this->id . ') |' . $e->getMessage(),
153+
'Unable to delete activity ' . $this->name
154+
. ' (' . $this->id . ') |' . $e->getMessage(),
155155
Analog::ERROR
156156
);
157157
return false;
@@ -188,8 +188,8 @@ public function check(array $values): bool
188188

189189
if (count($this->errors) > 0) {
190190
Analog::log(
191-
'Some errors has been thrown attempting to edit/store an activity' . "\n" .
192-
print_r($this->errors, true),
191+
'Some errors has been thrown attempting to edit/store an activity' . "\n"
192+
. print_r($this->errors, true),
193193
Analog::ERROR
194194
);
195195
return false;
@@ -214,8 +214,8 @@ public function store(): bool
214214
try {
215215
$values = [
216216
'name' => $this->name,
217-
'is_active' => ($this->active ? $this->active :
218-
($this->zdb->isPostgres() ? 'false' : 0)),
217+
'is_active' => ($this->active ? $this->active
218+
: ($this->zdb->isPostgres() ? 'false' : 0)),
219219
'comment' => $this->comment
220220
];
221221

@@ -271,8 +271,8 @@ public function store(): bool
271271
}
272272
} catch (\Exception $e) {
273273
Analog::log(
274-
'Something went wrong :\'( | ' . $e->getMessage() . "\n" .
275-
$e->getTraceAsString(),
274+
'Something went wrong :\'( | ' . $e->getMessage() . "\n"
275+
. $e->getTraceAsString(),
276276
Analog::ERROR
277277
);
278278
throw $e;

lib/GaletteEvents/Booking.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ public function remove(): bool
167167
$this->zdb->connection->rollBack();
168168
}
169169
Analog::log(
170-
'Unable to delete booking ' .
171-
' (' . $this->id . ') |' . $e->getMessage(),
170+
'Unable to delete booking '
171+
. ' (' . $this->id . ') |' . $e->getMessage(),
172172
Analog::ERROR
173173
);
174174
return false;
@@ -295,9 +295,9 @@ public function check(array $values): array|bool
295295
$this->date = $d->format('Y-m-d');
296296
} catch (\Exception $e) {
297297
Analog::log(
298-
'Wrong date format. field: booking_date' .
299-
', value: ' . $value . ', expected fmt: ' .
300-
__("Y-m-d") . ' | ' . $e->getMessage(),
298+
'Wrong date format. field: booking_date'
299+
. ', value: ' . $value . ', expected fmt: '
300+
. __("Y-m-d") . ' | ' . $e->getMessage(),
301301
Analog::INFO
302302
);
303303
$this->errors[] = sprintf(
@@ -335,8 +335,8 @@ public function check(array $values): array|bool
335335

336336
if (count($this->errors) > 0) {
337337
Analog::log(
338-
'Some errors has been threw attempting to edit/store a booking' . "\n" .
339-
print_r($this->errors, true),
338+
'Some errors has been threw attempting to edit/store a booking' . "\n"
339+
. print_r($this->errors, true),
340340
Analog::ERROR
341341
);
342342
return $this->errors;
@@ -364,8 +364,8 @@ public function store(): bool
364364
Event::PK => $this->event,
365365
Adherent::PK => $this->member,
366366
'booking_date' => $this->date,
367-
'is_paid' => ($this->paid ? $this->paid :
368-
($this->zdb->isPostgres() ? 'false' : 0)),
367+
'is_paid' => ($this->paid ? $this->paid
368+
: ($this->zdb->isPostgres() ? 'false' : 0)),
369369
'payment_method' => $this->payment_method,
370370
'payment_amount' => $this->amount,
371371
'bank_name' => $this->bank_name,
@@ -448,8 +448,8 @@ public function store(): bool
448448
];
449449
} elseif ($result['checked'] != $this->activities[$result[Activity::PK]]['checked']) {
450450
$update[$result[Activity::PK]] = [
451-
'checked' => ($checked ? $checked :
452-
($this->zdb->isPostgres() ? 'false' : 0))
451+
'checked' => ($checked ? $checked
452+
: ($this->zdb->isPostgres() ? 'false' : 0))
453453
];
454454
} else {
455455
$void[$result[Activity::PK]] = true;
@@ -460,8 +460,8 @@ public function store(): bool
460460
$insert[$aid] = [
461461
Activity::PK => $aid,
462462
self::PK => $this->id,
463-
'checked' => ($checked ? $checked :
464-
($this->zdb->isPostgres() ? 'false' : 0))
463+
'checked' => ($checked ? $checked
464+
: ($this->zdb->isPostgres() ? 'false' : 0))
465465
];
466466
}
467467
}
@@ -538,8 +538,8 @@ public function store(): bool
538538
} catch (\Exception $e) {
539539
$this->zdb->connection->rollBack();
540540
Analog::log(
541-
'Something went wrong :\'( | ' . $e->getMessage() . "\n" .
542-
$e->getTraceAsString(),
541+
'Something went wrong :\'( | ' . $e->getMessage() . "\n"
542+
. $e->getTraceAsString(),
543543
Analog::ERROR
544544
);
545545
throw $e;
@@ -803,8 +803,8 @@ public function getActivities(): array
803803
*/
804804
public function getRowClass(bool $public = false): string
805805
{
806-
$strclass = 'event-' .
807-
($this->isPaid() ? 'paid' : 'notpaid');
806+
$strclass = 'event-'
807+
. ($this->isPaid() ? 'paid' : 'notpaid');
808808
return $strclass;
809809
}
810810
}

lib/GaletteEvents/Controllers/Crud/BookingsController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ public function handleBatch(Request $request, Response $response): Response
287287
$this->session->redirect_mailing = $this->routeparser->urlFor(
288288
'events_bookings',
289289
[
290-
'event' => $filters->event_filter == null ?
291-
'all' :
292-
$filters->event_filter
290+
'event' => $filters->event_filter == null
291+
? 'all'
292+
: $filters->event_filter
293293
]
294294
);
295295
return $response
@@ -391,8 +391,8 @@ public function edit(Request $request, Response $response, ?int $id = null, stri
391391
$booking->setEvent((int)$get['event']);
392392
}
393393
if (
394-
$id_adh !== null &&
395-
($this->login->isAdmin() || $this->login->isStaff() || $this->login->isGroupManager())
394+
$id_adh !== null
395+
&& ($this->login->isAdmin() || $this->login->isStaff() || $this->login->isGroupManager())
396396
) {
397397
$booking->setMember($id_adh);
398398
} elseif (

lib/GaletteEvents/Event.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ public function remove(): bool
181181
$this->zdb->connection->rollBack();
182182
}
183183
Analog::log(
184-
'Unable to delete event ' . $this->name .
185-
' (' . $this->id . ') |' . $e->getMessage(),
184+
'Unable to delete event ' . $this->name
185+
. ' (' . $this->id . ') |' . $e->getMessage(),
186186
Analog::ERROR
187187
);
188188
return false;
@@ -220,9 +220,9 @@ public function check(array $values): bool|array
220220
$this->$datefield = $d->format('Y-m-d');
221221
} catch (\Exception $e) {
222222
Analog::log(
223-
'Wrong date format. field: ' . $datefield .
224-
', value: ' . $value . ', expected fmt: ' .
225-
__("Y-m-d") . ' | ' . $e->getMessage(),
223+
'Wrong date format. field: ' . $datefield
224+
. ', value: ' . $value . ', expected fmt: '
225+
. __("Y-m-d") . ' | ' . $e->getMessage(),
226226
Analog::INFO
227227
);
228228
if ($datefield == 'begin_date') {
@@ -344,8 +344,8 @@ public function check(array $values): bool|array
344344

345345
if (count($this->errors) > 0) {
346346
Analog::log(
347-
'Some errors has been threw attempting to edit/store an event' . "\n" .
348-
print_r($this->errors, true),
347+
'Some errors has been threw attempting to edit/store an event' . "\n"
348+
. print_r($this->errors, true),
349349
Analog::ERROR
350350
);
351351
return $this->errors;
@@ -377,8 +377,8 @@ public function store(): bool
377377
'country' => ($this->country ?: new Expression('NULL')),
378378
'begin_date' => $this->begin_date,
379379
'end_date' => $this->end_date,
380-
'is_open' => ($this->open ?:
381-
($this->zdb->isPostgres() ? 'false' : 0)),
380+
'is_open' => ($this->open
381+
?: ($this->zdb->isPostgres() ? 'false' : 0)),
382382
Group::PK => ($this->group ?: new Expression('NULL')),
383383
'comment' => $this->comment,
384384
'color' => $this->color
@@ -524,8 +524,8 @@ public function store(): bool
524524
} catch (\Exception $e) {
525525
$this->zdb->connection->rollBack();
526526
Analog::log(
527-
'Something went wrong :\'( | ' . $e->getMessage() . "\n" .
528-
$e->getTraceAsString(),
527+
'Something went wrong :\'( | ' . $e->getMessage() . "\n"
528+
. $e->getTraceAsString(),
529529
Analog::ERROR
530530
);
531531
throw $e;

lib/GaletteEvents/Filters/BookingsList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ public function __set(string $name, mixed $value): void
155155
$this->$name = $value;
156156
} elseif ($value !== null) {
157157
Analog::log(
158-
'[BookingsList] Value for property `' . $name .
159-
'` should be an array (' . gettype($value) . ' given)',
158+
'[BookingsList] Value for property `' . $name
159+
. '` should be an array (' . gettype($value) . ' given)',
160160
Analog::WARNING
161161
);
162162
}

lib/GaletteEvents/Filters/EventsList.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ public function __get(string $name): mixed
140140
} catch (\Exception $e) {
141141
//oops, we've got a bad date :/
142142
Analog::log(
143-
'Bad date (' . $this->$name . ') | ' .
144-
$e->getMessage(),
143+
'Bad date (' . $this->$name . ') | '
144+
. $e->getMessage(),
145145
Analog::INFO
146146
);
147147
return $this->$name;
@@ -249,9 +249,9 @@ public function __set(string $name, mixed $value): void
249249
}
250250
} catch (\Exception $e) {
251251
Analog::log(
252-
'Wrong date format. field: ' . $name .
253-
', value: ' . $value . ', expected fmt: ' .
254-
__("Y-m-d") . ' | ' . $e->getMessage(),
252+
'Wrong date format. field: ' . $name
253+
. ', value: ' . $value . ', expected fmt: '
254+
. __("Y-m-d") . ' | ' . $e->getMessage(),
255255
Analog::INFO
256256
);
257257
throw $e;

lib/GaletteEvents/Repository/Bookings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ private function buildWhereClause(Select $select): void
237237
}
238238

239239
if (
240-
$this->filters->payment_type_filter !== null &&
241-
(int)$this->filters->payment_type_filter != -1
240+
$this->filters->payment_type_filter !== null
241+
&& (int)$this->filters->payment_type_filter != -1
242242
) {
243243
$select->where->equalTo(
244244
'payment_method',
@@ -337,8 +337,8 @@ private function canOrderBy(string $field_name, ?array $fields): bool
337337
return true;
338338
} else {
339339
Analog::log(
340-
'Trying to order by ' . $field_name . ' while it is not in ' .
341-
'selected fields.',
340+
'Trying to order by ' . $field_name . ' while it is not in '
341+
. 'selected fields.',
342342
Analog::WARNING
343343
);
344344
return false;

lib/GaletteEvents/Repository/Events.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ private function canOrderBy(string $field_name, ?array $fields = null): bool
285285
return true;
286286
} else {
287287
Analog::log(
288-
'Trying to order by ' . $field_name . ' while it is not in ' .
289-
'selected fields.',
288+
'Trying to order by ' . $field_name . ' while it is not in '
289+
. 'selected fields.',
290290
Analog::WARNING
291291
);
292292
return false;

0 commit comments

Comments
 (0)