Passed
Push — main ( aaef5c...e4c121 )
by TARIQ
71:39
created
plugins/woocommerce/includes/admin/class-wc-admin-addons.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1438,7 +1438,8 @@  discard block
 block discarded – undo
1438 1438
 						<div class="product-price-block">
1439 1439
 							<?php if ( $mapped->is_free ) : ?>
1440 1440
 								<span class="price"><?php esc_html_e( 'Free', 'woocommerce' ); ?></span>
1441
-							<?php else : ?>
1441
+							<?php else {
1442
+    : ?>
1442 1443
 								<span class="price">
1443 1444
 									<?php
1444 1445
 									echo wp_kses(
@@ -1450,6 +1451,7 @@  discard block
 block discarded – undo
1450 1451
 											'bdi'  => array(),
1451 1452
 										)
1452 1453
 									);
1454
+}
1453 1455
 									?>
1454 1456
 								</span>
1455 1457
 								<span class="price-suffix">
Please login to merge, or discard this patch.
woocommerce/includes/admin/meta-boxes/views/html-product-attribute.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,11 @@
 block discarded – undo
20 20
 						<?php if ( $attribute->is_taxonomy() ) : ?>
21 21
 							<strong><?php echo wc_attribute_label( $attribute->get_name() ); ?></strong>
22 22
 							<input type="hidden" name="attribute_names[<?php echo esc_attr( $i ); ?>]" value="<?php echo esc_attr( $attribute->get_name() ); ?>" />
23
-						<?php else : ?>
24
-							<input type="text" class="attribute_name" name="attribute_names[<?php echo esc_attr( $i ); ?>]" value="<?php echo esc_attr( $attribute->get_name() ); ?>" />
23
+						<?php else {
24
+    : ?>
25
+							<input type="text" class="attribute_name" name="attribute_names[<?php echo esc_attr( $i );
26
+}
27
+?>]" value="<?php echo esc_attr( $attribute->get_name() ); ?>" />
25 28
 						<?php endif; ?>
26 29
 
27 30
 						<input type="hidden" name="attribute_position[<?php echo esc_attr( $i ); ?>]" class="attribute_position" value="<?php echo esc_attr( $attribute->get_position() ); ?>" />
Please login to merge, or discard this patch.
woocommerce/includes/admin/meta-boxes/views/html-variation-admin.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,12 @@
 block discarded – undo
38 38
 					<?php foreach ( $attribute->get_terms() as $option ) : ?>
39 39
 						<option <?php selected( $selected_value, $option->slug ); ?> value="<?php echo esc_attr( $option->slug ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option->name, $option, $attribute->get_name(), $product_object ) ); ?></option>
40 40
 					<?php endforeach; ?>
41
-				<?php else : ?>
41
+				<?php else {
42
+    : ?>
42 43
 					<?php foreach ( $attribute->get_options() as $option ) : ?>
43
-						<option <?php selected( $selected_value, $option ); ?> value="<?php echo esc_attr( $option ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute->get_name(), $product_object ) ); ?></option>
44
+						<option <?php selected( $selected_value, $option );
45
+}
46
+?> value="<?php echo esc_attr( $option ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute->get_name(), $product_object ) ); ?></option>
44 47
 					<?php endforeach; ?>
45 48
 				<?php endif; ?>
46 49
 			</select>
Please login to merge, or discard this patch.
includes/admin/meta-boxes/views/html-product-data-variations.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,11 +19,14 @@  discard block
 block discarded – undo
19 19
 				<p><a class="button-primary" href="<?php echo esc_url( apply_filters( 'woocommerce_docs_url', 'https://docs.woocommerce.com/document/variable-product/', 'product-variations' ) ); ?>" target="_blank"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a></p>
20 20
 			</div>
21 21
 
22
-		<?php else : ?>
22
+		<?php else {
23
+    : ?>
23 24
 
24 25
 			<div class="toolbar toolbar-variations-defaults">
25 26
 				<div class="variations-defaults">
26
-					<strong><?php esc_html_e( 'Default Form Values', 'woocommerce' ); ?>: <?php echo wc_help_tip( __( 'Choose a default form value if you want a certain variation already selected when a user visits the product page.', 'woocommerce' ) ); ?></strong>
27
+					<strong><?php esc_html_e( 'Default Form Values', 'woocommerce' );
28
+}
29
+?>: <?php echo wc_help_tip( __( 'Choose a default form value if you want a certain variation already selected when a user visits the product page.', 'woocommerce' ) ); ?></strong>
27 30
 					<?php
28 31
 					foreach ( $variation_attributes as $attribute ) {
29 32
 						$selected_value = isset( $default_attributes[ sanitize_title( $attribute->get_name() ) ] ) ? $default_attributes[ sanitize_title( $attribute->get_name() ) ] : '';
@@ -35,9 +38,12 @@  discard block
 block discarded – undo
35 38
 								<?php foreach ( $attribute->get_terms() as $option ) : ?>
36 39
 									<option <?php selected( $selected_value, $option->slug ); ?> value="<?php echo esc_attr( $option->slug ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option->name, $option, $attribute->get_name(), $product_object ) ); ?></option>
37 40
 								<?php endforeach; ?>
38
-							<?php else : ?>
41
+							<?php else {
42
+    : ?>
39 43
 								<?php foreach ( $attribute->get_options() as $option ) : ?>
40
-									<option <?php selected( $selected_value, $option ); ?> value="<?php echo esc_attr( $option ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute->get_name(), $product_object ) ); ?></option>
44
+									<option <?php selected( $selected_value, $option );
45
+}
46
+?> value="<?php echo esc_attr( $option ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute->get_name(), $product_object ) ); ?></option>
41 47
 								<?php endforeach; ?>
42 48
 							<?php endif; ?>
43 49
 						</select>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -140,8 +140,11 @@  discard block
 block discarded – undo
140 140
 							<a href="<?php echo esc_url( $post_url ); ?>" class="tips" data-tip="<?php echo esc_attr( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) ); ?>">
141 141
 								<span><?php echo esc_html( $item->get_code() ); ?></span>
142 142
 							</a>
143
-						<?php else : ?>
144
-							<span class="tips" data-tip="<?php echo esc_attr( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) ); ?>">
143
+						<?php else {
144
+    : ?>
145
+							<span class="tips" data-tip="<?php echo esc_attr( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) );
146
+}
147
+?>">
145 148
 								<span><?php echo esc_html( $item->get_code() ); ?></span>
146 149
 							</span>
147 150
 						<?php endif; ?>
@@ -290,8 +293,11 @@  discard block
 block discarded – undo
290 293
 			<?php if ( wc_coupons_enabled() ) : ?>
291 294
 				<button type="button" class="button add-coupon"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
292 295
 			<?php endif; ?>
293
-		<?php else : ?>
294
-			<span class="description"><?php echo wc_help_tip( __( 'To edit this order change the status back to "Pending payment"', 'woocommerce' ) ); ?> <?php esc_html_e( 'This order is no longer editable.', 'woocommerce' ); ?></span>
296
+		<?php else {
297
+    : ?>
298
+			<span class="description"><?php echo wc_help_tip( __( 'To edit this order change the status back to "Pending payment"', 'woocommerce' ) );
299
+}
300
+?> <?php esc_html_e( 'This order is no longer editable.', 'woocommerce' ); ?></span>
295 301
 		<?php endif; ?>
296 302
 		<?php if ( $render_refunds ) : ?>
297 303
 			<button type="button" class="button refund-items"><?php esc_html_e( 'Refund', 'woocommerce' ); ?></button>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/class-wc-admin-setup-wizard.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1651,8 +1651,11 @@  discard block
 block discarded – undo
1651 1651
 			<div class="wc-wizard-service-name">
1652 1652
 				<?php if ( ! empty( $item_info['image'] ) ) : ?>
1653 1653
 					<img src="<?php echo esc_attr( $item_info['image'] ); ?>" alt="<?php echo esc_attr( $item_info['name'] ); ?>" />
1654
-				<?php else : ?>
1655
-					<p><?php echo esc_html( $item_info['name'] ); ?></p>
1654
+				<?php else {
1655
+    : ?>
1656
+					<p><?php echo esc_html( $item_info['name'] );
1657
+}
1658
+?></p>
1656 1659
 				<?php endif; ?>
1657 1660
 			</div>
1658 1661
 			<div class="wc-wizard-service-enable">
@@ -2089,10 +2092,13 @@  discard block
 block discarded – undo
2089 2092
 					src="<?php echo esc_url( WC()->plugin_url() . '/assets/images/wcs-notice.png' ); ?>"
2090 2093
 				/>
2091 2094
 			</div>
2092
-		<?php else : ?>
2095
+		<?php else {
2096
+    : ?>
2093 2097
 			<img
2094 2098
 				class="jetpack-logo"
2095
-				src="<?php echo esc_url( WC()->plugin_url() . '/assets/images/jetpack_vertical_logo.png' ); ?>"
2099
+				src="<?php echo esc_url( WC()->plugin_url() . '/assets/images/jetpack_vertical_logo.png' );
2100
+}
2101
+?>"
2096 2102
 				alt="<?php esc_attr_e( 'Jetpack logo', 'woocommerce' ); ?>"
2097 2103
 			/>
2098 2104
 		<?php endif; ?>
@@ -2106,7 +2112,8 @@  discard block
 block discarded – undo
2106 2112
 					<?php esc_html_e( 'Finish setting up your store', 'woocommerce' ); ?>
2107 2113
 				</a>
2108 2114
 			</p>
2109
-		<?php else : ?>
2115
+		<?php else {
2116
+    : ?>
2110 2117
 			<p class="jetpack-terms">
2111 2118
 				<?php
2112 2119
 					printf(
@@ -2114,6 +2121,7 @@  discard block
 block discarded – undo
2114 2121
 						'https://wordpress.com/tos',
2115 2122
 						'https://jetpack.com/support/what-data-does-jetpack-sync'
2116 2123
 					);
2124
+}
2117 2125
 				?>
2118 2126
 			</p>
2119 2127
 			<form method="post" class="activate-jetpack">
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/helper/views/html-main.php 1 patch
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -100,9 +100,12 @@  discard block
 block discarded – undo
100 100
 									<strong><?php esc_html_e( 'Expiring soon!', 'woocommerce' ); ?></strong>
101 101
 									<?php echo esc_html( date_i18n( 'F jS, Y', $subscription['expires'] ) ); ?>
102 102
 								</span>
103
-							<?php else : ?>
103
+							<?php else {
104
+    : ?>
104 105
 								<span class="renews">
105
-									<?php esc_html_e( 'Expires on:', 'woocommerce' ); ?>
106
+									<?php esc_html_e( 'Expires on:', 'woocommerce' );
107
+}
108
+?>
106 109
 									<?php echo esc_html( date_i18n( 'F jS, Y', $subscription['expires'] ) ); ?>
107 110
 								</span>
108 111
 							<?php endif; ?>
@@ -157,9 +160,12 @@  discard block
 block discarded – undo
157 160
 									<span class="form-toggle__switch"></span>
158 161
 								</label>
159 162
 							</span>
160
-						<?php else : ?>
163
+						<?php else {
164
+    : ?>
161 165
 							<span class="form-toggle__wrapper">
162
-								<span class="form-toggle disabled is-compact"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></span>
166
+								<span class="form-toggle disabled is-compact"><?php esc_html_e( 'Inactive', 'woocommerce' );
167
+}
168
+?></span>
163 169
 								<label class="form-toggle__label" for="activate-extension">
164 170
 									<span class="form-toggle__label-content">
165 171
 										<label for="activate-extension"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></label>
@@ -187,9 +193,12 @@  discard block
 block discarded – undo
187 193
 
188 194
 				</tbody>
189 195
 			<?php endforeach; ?>
190
-		<?php else : ?>
196
+		<?php else {
197
+    : ?>
191 198
 			<tr>
192
-				<td colspan="3"><em><?php esc_html_e( 'Could not find any subscriptions on your WooCommerce.com account', 'woocommerce' ); ?></td>
199
+				<td colspan="3"><em><?php esc_html_e( 'Could not find any subscriptions on your WooCommerce.com account', 'woocommerce' );
200
+}
201
+?></td>
193 202
 			</tr>
194 203
 		<?php endif; ?>
195 204
 		</tbody>
Please login to merge, or discard this patch.
woocommerce/includes/admin/reports/class-wc-report-taxes-by-date.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -251,10 +251,13 @@
 block discarded – undo
251 251
 						<th class="total_row"><?php echo wc_price( $gross - $total_tax ); ?></th>
252 252
 					</tr>
253 253
 				</tfoot>
254
-			<?php else : ?>
254
+			<?php else {
255
+    : ?>
255 256
 				<tbody>
256 257
 					<tr>
257
-						<td><?php _e( 'No taxes found in this period', 'woocommerce' ); ?></td>
258
+						<td><?php _e( 'No taxes found in this period', 'woocommerce' );
259
+}
260
+?></td>
258 261
 					</tr>
259 262
 				</tbody>
260 263
 			<?php endif; ?>
Please login to merge, or discard this patch.
plugins/woocommerce/includes/admin/reports/class-wc-report-coupon-usage.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -221,8 +221,11 @@  discard block
 block discarded – undo
221 221
 						<input type="hidden" name="tab" value="<?php echo ( ! empty( $_GET['tab'] ) ) ? esc_attr( wp_unslash( $_GET['tab'] ) ) : ''; ?>" />
222 222
 						<input type="hidden" name="report" value="<?php echo ( ! empty( $_GET['report'] ) ) ? esc_attr( wp_unslash( $_GET['report'] ) ) : ''; ?>" />
223 223
 						<?php // @codingStandardsIgnoreEnd ?>
224
-					<?php else : ?>
225
-						<span><?php esc_html_e( 'No used coupons found', 'woocommerce' ); ?></span>
224
+					<?php else {
225
+    : ?>
226
+						<span><?php esc_html_e( 'No used coupons found', 'woocommerce' );
227
+}
228
+?></span>
226 229
 					<?php endif; ?>
227 230
 				</div>
228 231
 			</form>
@@ -344,9 +347,12 @@  discard block
 block discarded – undo
344 347
 			jQuery( '.section' ).slideUp( 100, function() {
345 348
 				<?php if ( empty( $this->coupon_codes ) ) : ?>
346 349
 					jQuery( '.section_title:eq(1)' ).trigger( 'click' );
347
-				<?php else : ?>
350
+				<?php else {
351
+    : ?>
348 352
 					jQuery( '.section_title:eq(0)' ).trigger( 'click' );
349
-				<?php endif; ?>
353
+				<?php endif;
354
+}
355
+?>
350 356
 			} );
351 357
 		</script>
352 358
 		<?php
Please login to merge, or discard this patch.