original_string: 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 );
  	}
code: 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 );
  	}
code_tokens: 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 ) ; }
docstring: Prepare states for each star.
  
  @param float|int $rating → plugin rating.
  
  @return array $rating → state for the five stars
docstring_tokens: Prepare states for each star .