]> 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 fe51c667d510f8415af47b0f31cd7877a96b2125..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();
@@ -193,7 +189,7 @@ class Poll extends Managed_DataObject
                                         array('id' => $p->id));
         }
 
-        common_log(LOG_DEBUG, "Saving poll: $p->id $p->uri");
+        common_debug("Saving poll: $p->id $p->uri");
         $p->insert();
 
         // TRANS: Notice content creating a poll.