@@ -163,7 +163,9 @@ |
||
| 163 | 163 | public function logOnce() |
| 164 | 164 | { |
| 165 | 165 | $single = glsr( Session::class )->get( 'glsr_log_once', null, true ); |
| 166 | - if( !is_array( $single ))return; |
|
| 166 | + if( !is_array( $single )) { |
|
| 167 | + return; |
|
| 168 | + } |
|
| 167 | 169 | foreach( $single as $message => $debug ) { |
| 168 | 170 | if( !empty( $debug )) { |
| 169 | 171 | $message.= PHP_EOL.print_r( $debug, 1 ); |
@@ -78,7 +78,9 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function renderFilters( $postType ) |
| 80 | 80 | { |
| 81 | - if( $postType !== Application::POST_TYPE )return; |
|
| 81 | + if( $postType !== Application::POST_TYPE ) { |
|
| 82 | + return; |
|
| 83 | + } |
|
| 82 | 84 | if( !( $status = filter_input( INPUT_GET, 'post_status' ))) { |
| 83 | 85 | $status = 'publish'; |
| 84 | 86 | } |
@@ -107,7 +109,9 @@ discard block |
||
| 107 | 109 | */ |
| 108 | 110 | protected function renderFilterRatings( $ratings ) |
| 109 | 111 | { |
| 110 | - if( empty( $ratings ))return; |
|
| 112 | + if( empty( $ratings )) { |
|
| 113 | + return; |
|
| 114 | + } |
|
| 111 | 115 | $ratings = array_flip( array_reverse( $ratings )); |
| 112 | 116 | array_walk( $ratings, function( &$value, $key ) { |
| 113 | 117 | $label = _n( '%s star', '%s stars', $key, 'site-reviews' ); |
@@ -130,7 +134,9 @@ discard block |
||
| 130 | 134 | */ |
| 131 | 135 | protected function renderFilterTypes( $types ) |
| 132 | 136 | { |
| 133 | - if( count( glsr()->reviewTypes ) < 2 )return; |
|
| 137 | + if( count( glsr()->reviewTypes ) < 2 ) { |
|
| 138 | + return; |
|
| 139 | + } |
|
| 134 | 140 | echo glsr( Builder::class )->label( __( 'Filter by type', 'site-reviews' ), [ |
| 135 | 141 | 'class' => 'screen-reader-text', |
| 136 | 142 | 'for' => 'review_type', |