]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apiaccountupdatedeliverydevice.php
Improved type-hint for following methods:
[quix0rs-gnu-social.git] / actions / apiaccountupdatedeliverydevice.php
index 425624707ae218995e18b81ad94139cfb872c7b5..370423ad2e9bd37d8e63e28e3ee7d2f58e525ce8 100644 (file)
@@ -54,7 +54,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -73,7 +73,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
      *
      * @return void
      */
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
 
@@ -84,7 +84,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
                 404,
                 $this->format
             );
-            return;
         }
 
         // Note: Twitter no longer supports IM
@@ -93,7 +92,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
             // TRANS: Client error displayed when no valid device parameter is provided for a user's delivery device setting.
             $this->clientError(_( 'You must specify a parameter named ' .
                                   '\'device\' with a value of one of: sms, im, none.' ));
-            return;
         }
 
         if (empty($this->user)) {
@@ -124,7 +122,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
             common_log_db_error($this->user, 'UPDATE', __FILE__);
             // TRANS: Server error displayed when a user's delivery device cannot be updated.
             $this->serverError(_('Could not update user.'));
-            return;
         }
 
         $profile = $this->user->getProfile();