]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Poll/classes/Poll_response.php
Added a lot more type-hints where they will happen. Please note that I found
[quix0rs-gnu-social.git] / plugins / Poll / classes / Poll_response.php
index 0fc08443fa7ee3ecd5fb71cce05fc60c9dbe2c60..3c9379a938c96452bc6840b95dbb10f7deba2a6b 100644 (file)
@@ -85,7 +85,7 @@ class Poll_response extends Managed_DataObject
      *
      * @return Poll_response found response or null
      */
-    static function getByNotice($notice)
+    static function getByNotice(Notice $notice)
     {
         return self::getKV('uri', $notice->uri);
     }
@@ -123,12 +123,8 @@ class Poll_response extends Managed_DataObject
      *
      * @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.'));