- 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:
Roland Häder 2018-07-29 19:42:22 +02:00
parent 93fb5a6151
commit f9784d7095
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
2 changed files with 153 additions and 121 deletions

View file

@ -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 */