Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary semicolons #1683

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Service/Holiday.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static function getYearsOption( ): string {
$year_options .= '<option value="'. $year .'" ';
if($i === 0){
$year_options .= ' selected ';
};
}

$year_options .='>'. $year++ .'</option>';
}
Expand Down
22 changes: 11 additions & 11 deletions templates/dashboard-index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1>Dashboard</h1>
<!-- based on Wordpress Dashboard -->
<!-- based on Wordpress Dashboard -->
<div class="wrap">
<div id="cb_welcome-panel" class="cb_welcome-panel">
<div class="cb_welcome-panel-content">
Expand All @@ -16,7 +16,7 @@
<div class="cb_welcome-panel-column cb_welcome-panel-last">
<h3><?php echo esc_html__('Support', 'commonsbooking') ;?></h3>
<ul>
<li><a href="https://commonsbooking.org/dokumentation" target="_blank"><?php echo esc_html__('Documentation & Tutorials', 'commonsbooking') ;?></a></li>
<li><a href="https://commonsbooking.org/dokumentation" target="_blank"><?php echo esc_html__('Documentation & Tutorials', 'commonsbooking') ;?></a></li>
<li><a href="mailto:[email protected]?body=%0D%0A%0D%0A-----------%0D%0A%0D%0AInstallations-URL: <?php echo home_url(); ?>%0D%0A%0D%0ACB-Version: <?php echo commonsbooking_sanitizeHTML( COMMONSBOOKING_VERSION ); ?>" target="_blank"><?php echo esc_html__('Support E-Mail', 'commonsbooking') ;?></a></li>
<li><a href="https://commonsbooking.org/kontakt/" target="_blank"><?php echo __('Contact & Newsletter', 'commonsbooking') ;?></a></li>
</ul>
Expand All @@ -37,7 +37,7 @@
<li><a href="edit.php?post_type=cb_timeframe"><span class="dashicons dashicons-calendar-alt"></span> <?php echo esc_html__('Timeframes', 'commonsbooking') ;?></a>
</li>
</ul>

</div><!-- .cb_welcome-panel-column -->
<div class="cb_welcome-panel-column">
<h3 style="padding-bottom:20px"><?php echo esc_html__('See Bookings & manage restrictions', 'commonsbooking') ;?></h3>
Expand Down Expand Up @@ -67,28 +67,28 @@
<div class="cb_welcome-panel-column-container">
<div class="cb_welcome-panel-column" style="width: 50%;">
<h3><?php echo esc_html__("Today's pickups", 'commonsbooking') ;?></h3>
<?php
<?php
// Display list of bookings with pickup date = today
$BeginningBookings = CommonsBooking\View\Dashboard::renderBeginningBookings();
if ($BeginningBookings) {
echo commonsbooking_sanitizeHTML($BeginningBookings);
} else {
echo esc_html__('No pickups today', 'commonsbooking');
};
echo esc_html__('No pickups today', 'commonsbooking');
}

?>
</div>
<div class="cb_welcome-panel-column" style="width: 50%">
<h3><?php echo esc_html__("Today's returns", 'commonsbooking') ;?></h3>
<?php
<?php
// Display list of bookings with return date = today
$BeginningBookings = CommonsBooking\View\Dashboard::renderEndingBookings();
if ($BeginningBookings) {
echo commonsbooking_sanitizeHTML($BeginningBookings);
} else {
echo esc_html__('No returns today', 'commonsbooking');
};
echo esc_html__('No returns today', 'commonsbooking');
}

?>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/shortcode-items.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<?php
if ($hasTimeFrames) {
/**
* if this item has bookable timeframes we load the template timeframe-withlocation.php and
* if this item has bookable timeframes we load the template timeframe-withlocation.php and
* set the variables used in this template
*/
foreach ($templateData['data'] as $locationId => $data ) {
Expand All @@ -45,4 +45,4 @@
set_query_var( 'data', $data );
commonsbooking_get_template_part( 'timeframe', 'withlocation' );
}
}; // end if ($timeframes) ?>
} // end if ($timeframes) ?>
6 changes: 3 additions & 3 deletions tests/php/Repository/TimeframeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ class TimeframeTest extends CustomPostTypeTest {
protected array $allTimeframes;

/**
* Create a completely seperate item, location and timeframe.
* Create a completely separate item, location and timeframe.
* @return void
*/
private function createOtherTimeframe( $start = null, $end = null ) {
if ( $start = null ) {
if ( $start === null ) {
$start = $this->repetition_start;
}
if ( $end = null ) {
if ( $end === null ) {
$end = $this->repetition_end;
}
$this->otherItemId = $this->createItem( "Other Item" );
Expand Down