public function setRating($rating)
    {
        if (! in_array($rating, $this->availableRatings)) {
            throw new \InvalidArgumentException('Invalid Gravatar rating.');
        }

        $this->rating = $rating;
    }