private function setPercentSize(\Jb\Bundle\TagCloudBundle\Model\Tag $tag, $max)
    {
        $percent = ($tag->getCounter() / $max) * 100;

        $weight = floor($percent / 10);

        if ($percent >= 5) {
            $weight++;
        }

        if ($percent >= 80 && $percent < 100) {
            $weight = 8;
        } elseif ($percent == 100) {
            $weight = 9;
        }

        $tag->setWeight($weight);
    }
private function setPercentSize(\Jb\Bundle\TagCloudBundle\Model\Tag $tag, $max)
    {
        $percent = ($tag->getCounter() / $max) * 100;

        $weight = floor($percent / 10);

        if ($percent >= 5) {
            $weight++;
        }

        if ($percent >= 80 && $percent < 100) {
            $weight = 8;
        } elseif ($percent == 100) {
            $weight = 9;
        }

        $tag->setWeight($weight);
    }
private function setPercentSize ( \ Jb \ Bundle \ TagCloudBundle \ Model \ Tag $ tag , $ max ) { $ percent = ( $ tag -> getCounter ( ) / $ max ) * 100 ; $ weight = floor ( $ percent / 10 ) ; if ( $ percent >= 5 ) { $ weight ++ ; } if ( $ percent >= 80 && $ percent < 100 ) { $ weight = 8 ; } elseif ( $ percent == 100 ) { $ weight = 9 ; } $ tag -> setWeight ( $ weight ) ; }
Set a size
@param \Jb\Bundle\TagCloudBundle\Model\Tag $tag
@param type $max
Set a size