<?php
defined('_JEXEC') or die('Restricted access');

$score = (int) $displayData->get('score', 0);
?>
<div class="rating-score">
    <?php for ($i = 0; $i < 5; $i++) : ?>
        <?php if ($i < $score) : ?>
            <label class="star-on"></label>
        <?php else : ?>
            <label></label>
        <?php endif ?>
    <?php endfor ?>
</div>