Skip to content

Commit

Permalink
Default option strategy to average
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-montanez committed May 28, 2015
1 parent 728e617 commit 018a91c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Service/RatingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public function __construct($doctrine, MemcachedService $memcache, $options, Eve
if (!isset($this->options['max']) || !is_numeric($this->options['max'])) {
$this->options['max'] = 5;
}

if (!isset($this->options['strategy'])) {
$this->options['strategy'] = 'average';
}
}

protected function validateVoteValue($value)
Expand Down

0 comments on commit 018a91c

Please sign in to comment.