src/controller/class-main.php
protected function prepare_stars( $rating ) {

		$stars     = [];
		$full_star = (int) floor( $rating );
		$half_star = ( ( $rating - $full_star ) > 0 ) ? true : false;

		for ( $i = 0; $i < $full_star; $i++ ) {
			$stars[] = 'filled';
		}

		if ( $half_star ) {
			$stars[] = 'half';
		}

		for ( $i = 0; $i < ( 5 - $full_star ); $i++ ) {
			$stars[] = 'empty';
		}

		return array_reverse( $stars );
	}
protected function prepare_stars( $rating ) {

		$stars     = [];
		$full_star = (int) floor( $rating );
		$half_star = ( ( $rating - $full_star ) > 0 ) ? true : false;

		for ( $i = 0; $i < $full_star; $i++ ) {
			$stars[] = 'filled';
		}

		if ( $half_star ) {
			$stars[] = 'half';
		}

		for ( $i = 0; $i < ( 5 - $full_star ); $i++ ) {
			$stars[] = 'empty';
		}

		return array_reverse( $stars );
	}
protected function prepare_stars ( $ rating ) { $ stars = [ ] ; $ full_star = ( int ) floor ( $ rating ) ; $ half_star = ( ( $ rating - $ full_star ) > 0 ) ? true : false ; for ( $ i = 0 ; $ i < $ full_star ; $ i ++ ) { $ stars [ ] = 'filled' ; } if ( $ half_star ) { $ stars [ ] = 'half' ; } for ( $ i = 0 ; $ i < ( 5 - $ full_star ) ; $ i ++ ) { $ stars [ ] = 'empty' ; } return array_reverse ( $ stars ) ; }
Prepare states for each star.

@param float|int $rating → plugin rating.

@return array $rating → state for the five stars
Prepare states for each star .