setPointCount example

$total = 0;

        foreach ($data as $row) {
            $points += $row['points'] * $row['total'];
            $total += $row['total'];
        }

        $this->sortByPointsDescending($data);

        $struct->setAverage($points / $total * 2);
        $struct->setCount($total);
        $struct->setPointCount($data);

        return $struct;
    }

    /** * @return Vote */
    public function hydrate(array $data)
    {
        $struct = new Vote();

        
Home | Imprint | This part of the site doesn't use cookies.