]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Poll/classes/Poll.php
Added a lot more type-hints where they will happen. Please note that I found
[quix0rs-gnu-social.git] / plugins / Poll / classes / Poll.php
index 15441420285d332cdf5daac06fac8b2c44d04e1a..850b5fc0578ed47e30ccaaded8e0196e9fe70827 100644 (file)
@@ -82,7 +82,7 @@ class Poll extends Managed_DataObject
      *
      * @return Poll found poll or null
      */
-    static function getByNotice($notice)
+    static function getByNotice(Notice $notice)
     {
         return self::getKV('uri', $notice->uri);
     }
@@ -167,12 +167,8 @@ class Poll extends Managed_DataObject
      *
      * @return Notice saved notice
      */
-    static function saveNew($profile, $question, $opts, $options=null)
+    static function saveNew(Profile $profile, $question, $opts, array $options = array())
     {
-        if (empty($options)) {
-            $options = array();
-        }
-
         $p = new Poll();
 
         $p->id          = UUID::gen();