mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-13 03:48:49 +00:00
[tumblr]
- added type-hints for `App` - added curly braces + spaces for better readability - avoided to use deprecated x(), replaced with empty() - converted multi single-line comment to single multi-line comment - opening curly brace behind a function/method/class belongs into next line
This commit is contained in:
parent
93fb5a6151
commit
f9784d7095
2 changed files with 153 additions and 121 deletions
|
@ -53,13 +53,13 @@ class TumblrOAuth {
|
|||
/**
|
||||
* construct TumblrOAuth object
|
||||
*/
|
||||
function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
|
||||
function __construct($consumer_key, $consumer_secret, $oauth_token = null, $oauth_token_secret = null) {
|
||||
$this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
|
||||
$this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
|
||||
if (!empty($oauth_token) && !empty($oauth_token_secret)) {
|
||||
$this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
|
||||
} else {
|
||||
$this->token = NULL;
|
||||
$this->token = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ class TumblrOAuth {
|
|||
*
|
||||
* @returns a key/value array containing oauth_token and oauth_token_secret
|
||||
*/
|
||||
function getRequestToken($oauth_callback = NULL) {
|
||||
function getRequestToken($oauth_callback = null) {
|
||||
$parameters = array();
|
||||
if (!empty($oauth_callback)) {
|
||||
$parameters['oauth_callback'] = $oauth_callback;
|
||||
|
@ -191,7 +191,7 @@ class TumblrOAuth {
|
|||
*
|
||||
* @return API results
|
||||
*/
|
||||
function http($url, $method, $postfields = NULL) {
|
||||
function http($url, $method, $postfields = null) {
|
||||
$this->http_info = array();
|
||||
$ci = curl_init();
|
||||
/* Curl settings */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue