Skip to content

Instantly share code, notes, and snippets.

@sjehutch
Last active August 29, 2015 14:27
Show Gist options
  • Save sjehutch/4243861d4fa6ad1877f5 to your computer and use it in GitHub Desktop.
Save sjehutch/4243861d4fa6ad1877f5 to your computer and use it in GitHub Desktop.
fanscore-rating-algorithm
$zero = range (0);
$low = range(1, 99);
$high = 100;
case in_array($countReview, $zero):
$sum = 50;
case in_array($rateTotal, $log):
$sum = ($rateTotal / $countReview) * 10;
break;
case $rateTotal >= $high:
$sum = ($rateTotal / $countReview (recent 100)) * 10;
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment