@@ -121,7 +121,9 @@ discard block |
||
| 121 | 121 | while( $reviews = $this->queryReviews( $args, $lastPostId, $limit )) { |
| 122 | 122 | $types = array_keys( array_flip( array_column( $reviews, 'type' ))); |
| 123 | 123 | foreach( $types as $type ) { |
| 124 | - if( isset( $counts[$type] ))continue; |
|
| 124 | + if( isset( $counts[$type] )) { |
|
| 125 | + continue; |
|
| 126 | + } |
|
| 125 | 127 | $counts[$type] = array_fill_keys( range( 0, Rating::MAX_RATING ), 0 ); |
| 126 | 128 | } |
| 127 | 129 | foreach( $reviews as $review ) { |
@@ -139,7 +141,9 @@ discard block |
||
| 139 | 141 | { |
| 140 | 142 | foreach( $reviewCounts as &$counts ) { |
| 141 | 143 | foreach( range( 0, Rating::MAX_RATING ) as $index ) { |
| 142 | - if( isset( $counts[$index] ))continue; |
|
| 144 | + if( isset( $counts[$index] )) { |
|
| 145 | + continue; |
|
| 146 | + } |
|
| 143 | 147 | $counts[$index] = 0; |
| 144 | 148 | } |
| 145 | 149 | ksort( $counts ); |