Passed
Push — main ( aaef5c...e4c121 )
by TARIQ
71:39
created
plugins/woocommerce/includes/admin/settings/views/html-webhooks-edit.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -176,10 +176,13 @@
 block discarded – undo
176 176
 							<?php echo esc_html( date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $webhook->get_date_created()->date( 'Y-m-d H:i:s' ) ) ) ); ?>
177 177
 						</td>
178 178
 					</tr>
179
-				<?php else : ?>
179
+				<?php else {
180
+    : ?>
180 181
 				<tr valign="top">
181 182
 						<th scope="row" class="titledesc">
182
-							<?php esc_html_e( 'Created at', 'woocommerce' ); ?>
183
+							<?php esc_html_e( 'Created at', 'woocommerce' );
184
+}
185
+?>
183 186
 						</th>
184 187
 						<td class="forminp">
185 188
 							<?php echo esc_html( date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $webhook->get_date_created()->date( 'Y-m-d H:i:s' ) ) ) ); ?>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/views/html-report-by-date.php 1 patch
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,8 +23,11 @@  discard block
 block discarded – undo
23 23
 			);
24 24
 			?>
25 25
 		</h3>
26
-	<?php else : ?>
27
-		<h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] ); ?></h3>
26
+	<?php else {
27
+    : ?>
28
+		<h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] );
29
+}
30
+?></h3>
28 31
 	<?php endif; ?>
29 32
 
30 33
 		<div class="stats_range">
@@ -69,7 +72,10 @@  discard block
 block discarded – undo
69 72
 						<ul class="chart-legend">
70 73
 							<?php foreach ( $legends as $legend ) : ?>
71 74
 								<?php // @codingStandardsIgnoreStart ?>
72
-								<li style="border-color: <?php echo $legend['color']; ?>" <?php if ( isset( $legend['highlight_series'] ) ) echo 'class="highlight_series ' . ( isset( $legend['placeholder'] ) ? 'tips' : '' ) . '" data-series="' . esc_attr( $legend['highlight_series'] ) . '"'; ?> data-tip="<?php echo isset( $legend['placeholder'] ) ? $legend['placeholder'] : ''; ?>">
75
+								<li style="border-color: <?php echo $legend['color']; ?>" <?php if ( isset( $legend['highlight_series'] ) ) {
76
+    echo 'class="highlight_series ' . ( isset( $legend['placeholder'] ) ? 'tips' : '' ) . '" data-series="' . esc_attr( $legend['highlight_series'] ) . '"';
77
+}
78
+?> data-tip="<?php echo isset( $legend['placeholder'] ) ? $legend['placeholder'] : ''; ?>">
73 79
 									<?php echo $legend['title']; ?>
74 80
 								</li>
75 81
 								<?php // @codingStandardsIgnoreEnd ?>
@@ -91,9 +97,12 @@  discard block
 block discarded – undo
91 97
 					<?php $this->get_main_chart(); ?>
92 98
 				</div>
93 99
 			</div>
94
-		<?php else : ?>
100
+		<?php else {
101
+    : ?>
95 102
 			<div class="inside">
96
-				<?php $this->get_main_chart(); ?>
103
+				<?php $this->get_main_chart();
104
+}
105
+?>
97 106
 			</div>
98 107
 		<?php endif; ?>
99 108
 	</div>
Please login to merge, or discard this patch.
woocommerce/includes/admin/views/html-admin-page-addons-category-nav.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,12 @@
 block discarded – undo
23 23
 			?>
24 24
 			<?php if ( $current_section === $section->slug ) : ?>
25 25
 				<li class="current">
26
-			<?php else: ?>
26
+			<?php else {
27
+    : ?>
27 28
 				<li>
28
-			<?php endif; ?>
29
+			<?php endif;
30
+}
31
+?>
29 32
 			<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons&section=' . esc_attr( $section->slug ) ) ); ?>">
30 33
 				<?php echo esc_html( $section->label ); ?>
31 34
 			</a>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php 1 patch
Braces   +33 added lines, -13 removed lines patch added patch discarded remove patch
@@ -192,9 +192,12 @@  discard block
 block discarded – undo
192 192
 			<td>
193 193
 				<?php if ( $environment['wp_debug_mode'] ) : ?>
194 194
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
195
-				<?php else : ?>
195
+				<?php else {
196
+    : ?>
196 197
 					<mark class="no">&ndash;</mark>
197
-				<?php endif; ?>
198
+				<?php endif;
199
+}
200
+?>
198 201
 			</td>
199 202
 		</tr>
200 203
 		<tr>
@@ -203,9 +206,12 @@  discard block
 block discarded – undo
203 206
 			<td>
204 207
 				<?php if ( $environment['wp_cron'] ) : ?>
205 208
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
206
-				<?php else : ?>
209
+				<?php else {
210
+    : ?>
207 211
 					<mark class="no">&ndash;</mark>
208
-				<?php endif; ?>
212
+				<?php endif;
213
+}
214
+?>
209 215
 			</td>
210 216
 		</tr>
211 217
 		<tr>
@@ -219,9 +225,12 @@  discard block
 block discarded – undo
219 225
 			<td>
220 226
 				<?php if ( $environment['external_object_cache'] ) : ?>
221 227
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
222
-				<?php else : ?>
228
+				<?php else {
229
+    : ?>
223 230
 					<mark class="no">&ndash;</mark>
224
-				<?php endif; ?>
231
+				<?php endif;
232
+}
233
+?>
225 234
 			</td>
226 235
 		</tr>
227 236
 	</tbody>
@@ -533,9 +542,12 @@  discard block
 block discarded – undo
533 542
 					</td>
534 543
 				</tr>
535 544
 			<?php } ?>
536
-		<?php else : ?>
545
+		<?php else {
546
+    : ?>
537 547
 			<tr>
538
-				<td><?php esc_html_e( 'Database information:', 'woocommerce' ); ?></td>
548
+				<td><?php esc_html_e( 'Database information:', 'woocommerce' );
549
+}
550
+?></td>
539 551
 				<td class="help">&nbsp;</td>
540 552
 				<td>
541 553
 					<?php
@@ -584,11 +596,13 @@  discard block
 block discarded – undo
584 596
 			<td>
585 597
 				<?php if ( $security['secure_connection'] ) : ?>
586 598
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
587
-				<?php else : ?>
599
+				<?php else {
600
+    : ?>
588 601
 					<mark class="error"><span class="dashicons dashicons-warning"></span>
589 602
 					<?php
590 603
 					/* Translators: %s: docs link. */
591 604
 					echo wp_kses_post( sprintf( __( 'Your store is not using HTTPS. <a href="%s" target="_blank">Learn more about HTTPS and SSL Certificates</a>.', 'woocommerce' ), 'https://docs.woocommerce.com/document/ssl-and-https/' ) );
605
+}
592 606
 					?>
593 607
 					</mark>
594 608
 				<?php endif; ?>
@@ -600,8 +614,11 @@  discard block
 block discarded – undo
600 614
 			<td>
601 615
 				<?php if ( $security['hide_errors'] ) : ?>
602 616
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
603
-				<?php else : ?>
604
-					<mark class="error"><span class="dashicons dashicons-warning"></span><?php esc_html_e( 'Error messages should not be shown to visitors.', 'woocommerce' ); ?></mark>
617
+				<?php else {
618
+    : ?>
619
+					<mark class="error"><span class="dashicons dashicons-warning"></span><?php esc_html_e( 'Error messages should not be shown to visitors.', 'woocommerce' );
620
+}
621
+?></mark>
605 622
 				<?php endif; ?>
606 623
 			</td>
607 624
 		</tr>
@@ -946,9 +963,12 @@  discard block
 block discarded – undo
946 963
 					?>
947 964
 				</td>
948 965
 			</tr>
949
-		<?php else : ?>
966
+		<?php else {
967
+    : ?>
950 968
 			<tr>
951
-				<td data-export-label="Overrides"><?php esc_html_e( 'Overrides', 'woocommerce' ); ?>:</td>
969
+				<td data-export-label="Overrides"><?php esc_html_e( 'Overrides', 'woocommerce' );
970
+}
971
+?>:</td>
952 972
 				<td class="help">&nbsp;</td>
953 973
 				<td>&ndash;</td>
954 974
 			</tr>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/views/html-admin-page-addons.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,11 +90,13 @@  discard block
 block discarded – undo
90 90
 			<?php if ( '_featured' !== $current_section ) : ?>
91 91
 				<?php if ( is_wp_error( $addons ) ) : ?>
92 92
 					<?php WC_Admin_Addons::output_empty( $addons->get_error_message() ); ?>
93
-				<?php else: ?>
93
+				<?php else {
94
+    : ?>
94 95
 					<?php
95 96
 					if ( ! empty( $promotions ) && WC()->is_wc_admin_active() ) {
96 97
 						foreach ( $promotions as $promotion ) {
97 98
 							WC_Admin_Addons::output_search_promotion_block( $promotion );
99
+}
98 100
 						}
99 101
 					}
100 102
 					?>
@@ -129,9 +131,12 @@  discard block
 block discarded – undo
129 131
 				<?php endif; ?>
130 132
 			<?php endif; ?>
131 133
 		</div>
132
-		<?php else : ?>
134
+		<?php else {
135
+    : ?>
133 136
 			<?php /* translators: a url */ ?>
134
-			<p><?php printf( wp_kses_post( __( 'Our catalog of WooCommerce Extensions can be found on WooCommerce.com here: <a href="%s">WooCommerce Extensions Catalog</a>', 'woocommerce' ) ), 'https://woocommerce.com/product-category/woocommerce-extensions/' ); ?></p>
137
+			<p><?php printf( wp_kses_post( __( 'Our catalog of WooCommerce Extensions can be found on WooCommerce.com here: <a href="%s">WooCommerce Extensions Catalog</a>', 'woocommerce' ) ), 'https://woocommerce.com/product-category/woocommerce-extensions/' );
138
+}
139
+?></p>
135 140
 		<?php endif; ?>
136 141
 
137 142
 		<?php if ( 'Storefront' !== $theme['Name'] && '_featured' !== $current_section ) : ?>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/views/html-admin-page-status-logs.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,6 +45,9 @@
 block discarded – undo
45 45
 	<div id="log-viewer">
46 46
 		<pre><?php echo esc_html( file_get_contents( WC_LOG_DIR . $viewed_log ) ); ?></pre>
47 47
 	</div>
48
-<?php else : ?>
49
-	<div class="updated woocommerce-message inline"><p><?php esc_html_e( 'There are currently no logs to view.', 'woocommerce' ); ?></p></div>
48
+<?php else {
49
+    : ?>
50
+	<div class="updated woocommerce-message inline"><p><?php esc_html_e( 'There are currently no logs to view.', 'woocommerce' );
51
+}
52
+?></p></div>
50 53
 <?php endif; ?>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/importers/class-wc-tax-rate-importer.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -294,8 +294,11 @@
 block discarded – undo
294 294
 				<p><?php esc_html_e( 'Before you can upload your import file, you will need to fix the following error:', 'woocommerce' ); ?></p>
295 295
 				<p><strong><?php echo esc_html( $upload_dir['error'] ); ?></strong></p>
296 296
 			</div>
297
-		<?php else : ?>
298
-			<form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo esc_attr( wp_nonce_url( $action, 'import-upload' ) ); ?>">
297
+		<?php else {
298
+    : ?>
299
+			<form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo esc_attr( wp_nonce_url( $action, 'import-upload' ) );
300
+}
301
+?>">
299 302
 				<table class="form-table">
300 303
 					<tbody>
301 304
 						<tr>
Please login to merge, or discard this patch.
woocommerce/includes/admin/importers/views/html-csv-import-mapping.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,11 @@
 block discarded – undo
44 44
 												<option value="<?php echo esc_attr( $sub_key ); ?>" <?php selected( $mapped_value, $sub_key ); ?>><?php echo esc_html( $sub_value ); ?></option>
45 45
 											<?php endforeach ?>
46 46
 										</optgroup>
47
-									<?php else : ?>
48
-										<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $mapped_value, $key ); ?>><?php echo esc_html( $value ); ?></option>
47
+									<?php else {
48
+    : ?>
49
+										<option value="<?php echo esc_attr( $key );
50
+}
51
+?>" <?php selected( $mapped_value, $key ); ?>><?php echo esc_html( $value ); ?></option>
49 52
 									<?php endif; ?>
50 53
 								<?php endforeach ?>
51 54
 							</select>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/class-wc-admin-profile.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,8 +188,11 @@
 block discarded – undo
188 188
 									<input type="checkbox" name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" value="1" class="<?php echo esc_attr( $field['class'] ); ?>" <?php checked( (int) get_user_meta( $user->ID, $key, true ), 1, true ); ?> />
189 189
 								<?php elseif ( ! empty( $field['type'] ) && 'button' === $field['type'] ) : ?>
190 190
 									<button type="button" id="<?php echo esc_attr( $key ); ?>" class="button <?php echo esc_attr( $field['class'] ); ?>"><?php echo esc_html( $field['text'] ); ?></button>
191
-								<?php else : ?>
192
-									<input type="text" name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $this->get_user_meta( $user->ID, $key ) ); ?>" class="<?php echo ( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>" />
191
+								<?php else {
192
+    : ?>
193
+									<input type="text" name="<?php echo esc_attr( $key );
194
+}
195
+?>" id="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $this->get_user_meta( $user->ID, $key ) ); ?>" class="<?php echo ( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>" />
193 196
 								<?php endif; ?>
194 197
 								<p class="description"><?php echo wp_kses_post( $field['description'] ); ?></p>
195 198
 							</td>
Please login to merge, or discard this patch.