]> git.mxchange.org Git - friendica-addons.git/commitdiff
Fix errors in statusnet addon
authorArt4 <art4@wlabs.de>
Sun, 8 Dec 2024 23:06:51 +0000 (23:06 +0000)
committerArt4 <art4@wlabs.de>
Sun, 8 Dec 2024 23:06:51 +0000 (23:06 +0000)
statusnet/library/codebirdsn.php
statusnet/library/statusnetoauth.php
statusnet/library/twitteroauth.php

index 91e256be047d20df58e8e8cff85addf13a5f5def..70743356885619dc57152930f223493de5ed4f98 100644 (file)
@@ -116,7 +116,7 @@ class CodebirdSN
      * Returns singleton class instance
      * Always use this method unless you're working with multiple authenticated users at once
      *
-     * @return Codebird The instance
+     * @return CodebirdSN The instance
      */
     public static function getInstance()
     {
@@ -420,6 +420,7 @@ class CodebirdSN
                 }
                 break;
             case CODEBIRD_RETURNFORMAT_OBJECT:
+                /** @var object $reply */
                 $reply->httpstatus = $httpstatus;
                 if ($httpstatus == 200) {
                     self::setBearerToken($reply->access_token);
@@ -490,7 +491,7 @@ class CodebirdSN
     /**
      * Generates a (hopefully) unique random string
      *
-     * @param int optional $length The length of the string to generate
+     * @param int $length The optional length of the string to generate
      *
      * @return string The random string
      */
@@ -505,9 +506,9 @@ class CodebirdSN
     /**
      * Generates an OAuth signature
      *
-     * @param string          $httpmethod Usually either 'GET' or 'POST' or 'DELETE'
-     * @param string          $method     The API method to call
-     * @param array  optional $params     The API call parameters, associative
+     * @param string $httpmethod Usually either 'GET' or 'POST' or 'DELETE'
+     * @param string $method     The API method to call
+     * @param array  $params     optional The API call parameters, associative
      *
      * @return string Authorization HTTP header
      */
@@ -871,12 +872,12 @@ class CodebirdSN
     /**
      * Calls the API using cURL
      *
-     * @param string          $httpmethod      The HTTP method to use for making the request
-     * @param string          $method          The API method to call
-     * @param string          $method_template The templated API method to call
-     * @param array  optional $params          The parameters to send along
-     * @param bool   optional $multipart       Whether to use multipart/form-data
-     * @param bool   optional $app_only_auth   Whether to use app-only bearer authentication
+     * @param string $httpmethod      The HTTP method to use for making the request
+     * @param string $method          The API method to call
+     * @param string $method_template The templated API method to call
+     * @param array  $params          optional The parameters to send along
+     * @param bool   $multipart       optional Whether to use multipart/form-data
+     * @param bool   $app_only_auth   optional Whether to use app-only bearer authentication
      *
      * @return mixed The API reply, encoded in the set return_format
      */
@@ -959,6 +960,7 @@ class CodebirdSN
         $httpstatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
         $reply = $this->_parseApiReply($method_template, $reply);
         if ($this->_return_format == CODEBIRD_RETURNFORMAT_OBJECT) {
+            /** @var object $reply */
             $reply->httpstatus = $httpstatus;
         } elseif ($this->_return_format == CODEBIRD_RETURNFORMAT_ARRAY) {
             $reply['httpstatus'] = $httpstatus;
index c9bb01636caf3360b08756ce545a557c27392d2e..c32b2b4fb6c73a3c9ff1e6d4eea5df06ef2ee89b 100644 (file)
@@ -52,11 +52,6 @@ class StatusNetOAuth extends TwitterOAuth
         *
         * Copied here from the TwitterOAuth library and complemented by applying the proxy settings of Friendica
         *
-        * @param string $method
-        * @param string $host
-        * @param string $path
-        * @param array  $parameters
-        *
         * @return array|object API results
         */
        function http($url, $method, $postfields = NULL)
index b33b5f9d27ca82f2de7ef8d88ab8daed083df361..bf413d230d71ec9568292f1089357367954c95da 100644 (file)
@@ -93,7 +93,7 @@ class TwitterOAuth
        /**
         * Get a request_token
         *
-        * @param callback $oauth_callback
+        * @param callable $oauth_callback
         * @return array
         */
        function getRequestToken($oauth_callback = null)
@@ -112,8 +112,6 @@ class TwitterOAuth
        /**
         * Get the authorize URL
         *
-        * @param array $token
-        * @param bool $sign_in_with_tumblr
         * @return string
         */
        function getAuthorizeURL($token, $sign_in_with_twitter = TRUE)