Don't use double-quoted strings if not needed
This commit is contained in:
parent
a1a1cf6f93
commit
216185b65c
|
@ -40,6 +40,7 @@
|
||||||
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
|
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
|
||||||
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
|
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
|
||||||
<rule ref="Generic.Formatting.SpaceAfterCast" />
|
<rule ref="Generic.Formatting.SpaceAfterCast" />
|
||||||
|
<rule ref="Squiz.Strings.DoubleQuoteUsage" />
|
||||||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
||||||
<exclude-pattern>/includes</exclude-pattern>
|
<exclude-pattern>/includes</exclude-pattern>
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -65,7 +65,7 @@ function admin_user()
|
||||||
$html .= ' <tr><td>' . __('DECT') . '</td><td>' . '<input size="40" name="eDECT" value="' . $user_source->contact->dect . '" class="form-control" maxlength="40"></td></tr>' . "\n";
|
$html .= ' <tr><td>' . __('DECT') . '</td><td>' . '<input size="40" name="eDECT" value="' . $user_source->contact->dect . '" class="form-control" maxlength="40"></td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
if ($user_source->settings->email_human) {
|
if ($user_source->settings->email_human) {
|
||||||
$html .= " <tr><td>" . __('settings.profile.email') . "</td><td>" . '<input type="email" size="40" name="eemail" value="' . $user_source->email . '" class="form-control" maxlength="254"></td></tr>' . "\n";
|
$html .= ' <tr><td>' . __('settings.profile.email') . '</td><td>' . '<input type="email" size="40" name="eemail" value="' . $user_source->email . '" class="form-control" maxlength="254"></td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
if (config('enable_tshirt_size') && !config('other_goodie')) {
|
if (config('enable_tshirt_size') && !config('other_goodie')) {
|
||||||
$html .= ' <tr><td>' . __('user.shirt_size') . '</td><td>'
|
$html .= ' <tr><td>' . __('user.shirt_size') . '</td><td>'
|
||||||
|
@ -178,7 +178,7 @@ function admin_user()
|
||||||
button(user_delete_link($user_source->id), icon('trash') . __('delete'), 'btn-danger')
|
button(user_delete_link($user_source->id), icon('trash') . __('delete'), 'btn-danger')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$html .= "<hr />";
|
$html .= '<hr>';
|
||||||
} else {
|
} else {
|
||||||
switch ($request->input('action')) {
|
switch ($request->input('action')) {
|
||||||
case 'save_groups':
|
case 'save_groups':
|
||||||
|
|
|
@ -249,7 +249,7 @@ function strip_request_item_nl($name, $default_value = null)
|
||||||
function strip_item($item)
|
function strip_item($item)
|
||||||
{
|
{
|
||||||
// Only allow letters, symbols, punctuation, separators and numbers without html tags
|
// 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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -340,7 +340,7 @@ function render_table($columns, $rows, $data = true)
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$html .= '<tr>';
|
$html .= '<tr>';
|
||||||
foreach ($columns as $key => $column) {
|
foreach ($columns as $key => $column) {
|
||||||
$value = " ";
|
$value = ' ';
|
||||||
if (isset($row[$key])) {
|
if (isset($row[$key])) {
|
||||||
$value = $row[$key];
|
$value = $row[$key];
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,11 +197,11 @@ class ShiftCalendarShiftRenderer
|
||||||
? $inner_text . icon('mortarboard-fill')
|
? $inner_text . icon('mortarboard-fill')
|
||||||
// Add link to join the angeltype first
|
// Add link to join the angeltype first
|
||||||
: $inner_text . '<br />'
|
: $inner_text . '<br />'
|
||||||
. button(
|
. button(
|
||||||
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype->id]),
|
||||||
sprintf(__('Become %s'), $angeltype->name),
|
sprintf(__('Become %s'), $angeltype->name),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
),
|
),
|
||||||
// Shift collides or user is already signed up: No signup allowed
|
// Shift collides or user is already signed up: No signup allowed
|
||||||
ShiftSignupStatus::COLLIDES, ShiftSignupStatus::SIGNED_UP => $inner_text,
|
ShiftSignupStatus::COLLIDES, ShiftSignupStatus::SIGNED_UP => $inner_text,
|
||||||
// Shift is full
|
// Shift is full
|
||||||
|
@ -251,12 +251,12 @@ class ShiftCalendarShiftRenderer
|
||||||
button(
|
button(
|
||||||
page_link_to('user_shifts', ['edit_shift' => $shift->id]),
|
page_link_to('user_shifts', ['edit_shift' => $shift->id]),
|
||||||
icon('pencil'),
|
icon('pencil'),
|
||||||
"btn-$class btn-sm border-light text-white"
|
'btn-' . $class . ' btn-sm border-light text-white'
|
||||||
),
|
),
|
||||||
button(
|
button(
|
||||||
page_link_to('user_shifts', ['delete_shift' => $shift->id]),
|
page_link_to('user_shifts', ['delete_shift' => $shift->id]),
|
||||||
icon('trash'),
|
icon('trash'),
|
||||||
"btn-$class btn-sm border-light text-white"
|
'btn-' . $class . ' btn-sm border-light text-white'
|
||||||
)
|
)
|
||||||
]) . '</div>';
|
]) . '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ class DesignController extends BaseController
|
||||||
$date = CarbonImmutable::now();
|
$date = CarbonImmutable::now();
|
||||||
|
|
||||||
for ($i = 1; $i <= 600; $i++) {
|
for ($i = 1; $i <= 600; $i++) {
|
||||||
$formattedDate = $date->format("Y-m-d");
|
$formattedDate = $date->format('Y-m-d');
|
||||||
$dateSelectOptions[$formattedDate] = $formattedDate;
|
$dateSelectOptions[$formattedDate] = $formattedDate;
|
||||||
$date = $date->addDay();
|
$date = $date->addDay();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue