Apply PHPCS suggestions
This commit is contained in:
parent
3fbec9fc5c
commit
f54d7b0991
|
@ -34,7 +34,7 @@ class WC_Admin_Addons {
|
|||
}
|
||||
|
||||
$parameter_string = '';
|
||||
$country = WC()->countries->get_base_country();
|
||||
$country = WC()->countries->get_base_country();
|
||||
if ( ! empty( $country ) ) {
|
||||
$parameter_string = '?' . http_build_query( array( 'country' => $country ) );
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ class WC_Admin_Addons {
|
|||
* @return void
|
||||
*/
|
||||
private static function output_group( $block ) {
|
||||
$capacity = $block->capacity ?? 3;
|
||||
$capacity = $block->capacity ?? 3;
|
||||
$product_list_classes = 3 === $capacity ? 'three-column' : 'two-column';
|
||||
$product_list_classes = 'products addons-products-' . $product_list_classes;
|
||||
?>
|
||||
|
@ -223,7 +223,7 @@ class WC_Admin_Addons {
|
|||
<?php
|
||||
foreach ( $block->buttons as $button ) {
|
||||
$button_classes = array( 'button', 'addons-buttons-banner-button' );
|
||||
$type = $button->type ?? null;
|
||||
$type = $button->type ?? null;
|
||||
if ( 'primary' === $type ) {
|
||||
$button_classes[] = 'addons-buttons-banner-button-primary';
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ function wccom_get_star_class( $rating, $index ) {
|
|||
if ( $rating >= $index ) {
|
||||
// Rating more that current star to show.
|
||||
return 'fill';
|
||||
} else if (
|
||||
} elseif (
|
||||
abs( $index - 1 - floor( $rating ) ) < 0.0000001 &&
|
||||
0 < ( $rating - floor( $rating ) )
|
||||
) {
|
||||
|
@ -99,7 +99,7 @@ function wccom_get_star_class( $rating, $index ) {
|
|||
|
||||
<div class="wrap">
|
||||
<div class="marketplace-content-wrapper">
|
||||
<?php if ( ! empty( $search ) && count( $addons ) == 0 ) : ?>
|
||||
<?php if ( ! empty( $search ) && 0 === count( $addons ) ) : ?>
|
||||
<h1 class="search-form-title">
|
||||
<?php esc_html_e( 'Sorry, could not find anything. Try searching again using a different term.', 'woocommerce' ); ?></p>
|
||||
</h1>
|
||||
|
|
Loading…
Reference in New Issue