diff --git a/.phpcs.xml b/.phpcs.xml index 58486753..0c36fa5b 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -40,6 +40,7 @@ + /includes diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index d562677d..7f2f6874 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -65,7 +65,7 @@ function admin_user() $html .= ' ' . __('DECT') . '' . '' . "\n"; } if ($user_source->settings->email_human) { - $html .= " " . __('settings.profile.email') . "" . '' . "\n"; + $html .= ' ' . __('settings.profile.email') . '' . '' . "\n"; } if (config('enable_tshirt_size') && !config('other_goodie')) { $html .= ' ' . __('user.shirt_size') . '' @@ -178,7 +178,7 @@ function admin_user() button(user_delete_link($user_source->id), icon('trash') . __('delete'), 'btn-danger') ]); - $html .= "
"; + $html .= '
'; } else { switch ($request->input('action')) { case 'save_groups': diff --git a/includes/sys_page.php b/includes/sys_page.php index 9909b697..a5eb7142 100644 --- a/includes/sys_page.php +++ b/includes/sys_page.php @@ -249,7 +249,7 @@ function strip_request_item_nl($name, $default_value = null) function strip_item($item) { // Only allow letters, symbols, punctuation, separators and numbers without html tags - return preg_replace("/([^\p{L}\p{S}\p{P}\p{Z}\p{N}+]+)/ui", '', strip_tags($item)); + return preg_replace('/([^\p{L}\p{S}\p{P}\p{Z}\p{N}+]+)/ui', '', strip_tags($item)); } /** diff --git a/includes/sys_template.php b/includes/sys_template.php index 49915baf..db789d87 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -340,7 +340,7 @@ function render_table($columns, $rows, $data = true) foreach ($rows as $row) { $html .= ''; foreach ($columns as $key => $column) { - $value = " "; + $value = ' '; if (isset($row[$key])) { $value = $row[$key]; } diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index e1f104bb..72f56f00 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -197,11 +197,11 @@ class ShiftCalendarShiftRenderer ? $inner_text . icon('mortarboard-fill') // Add link to join the angeltype first : $inner_text . '
' - . button( - page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]), - sprintf(__('Become %s'), $angeltype->name), - 'btn-sm' - ), + . button( + page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]), + sprintf(__('Become %s'), $angeltype->name), + 'btn-sm' + ), // Shift collides or user is already signed up: No signup allowed ShiftSignupStatus::COLLIDES, ShiftSignupStatus::SIGNED_UP => $inner_text, // Shift is full @@ -251,12 +251,12 @@ class ShiftCalendarShiftRenderer button( page_link_to('user_shifts', ['edit_shift' => $shift->id]), icon('pencil'), - "btn-$class btn-sm border-light text-white" + 'btn-' . $class . ' btn-sm border-light text-white' ), button( page_link_to('user_shifts', ['delete_shift' => $shift->id]), icon('trash'), - "btn-$class btn-sm border-light text-white" + 'btn-' . $class . ' btn-sm border-light text-white' ) ]) . ''; } diff --git a/src/Controllers/DesignController.php b/src/Controllers/DesignController.php index db71dcc6..a9935f73 100644 --- a/src/Controllers/DesignController.php +++ b/src/Controllers/DesignController.php @@ -53,7 +53,7 @@ class DesignController extends BaseController $date = CarbonImmutable::now(); for ($i = 1; $i <= 600; $i++) { - $formattedDate = $date->format("Y-m-d"); + $formattedDate = $date->format('Y-m-d'); $dateSelectOptions[$formattedDate] = $formattedDate; $date = $date->addDay(); }