*
* @return Poll_response found response or null
*/
- static function getByNotice($notice)
+ static function getByNotice(Notice $notice)
{
return self::getKV('uri', $notice->uri);
}
*
* @return Notice saved notice
*/
- static function saveNew($profile, $poll, $selection, $options=null)
+ static function saveNew(Profile $profile, $poll, $selection, array $options=array)
{
- if (empty($options)) {
- $options = array();
- }
-
if (!$poll->isValidSelection($selection)) {
// TRANS: Client exception thrown when responding to a poll with an invalid option.
throw new ClientException(_m('Invalid poll selection.'));