Skip to content
Snippets Groups Projects
Unverified Commit b76ea672 authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files
parent 6d2ac8b4
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,15 @@ if (!class_exists('OAuthException')) {
/*
* Generic exception class
*/
class OAuthException extends Exception {
class OAuthException extends Exception
{
// pass
}
}
if (!class_exists('OAuthConsumer')) {
class OAuthConsumer {
class OAuthConsumer
{
public $key;
public $secret;
public $callback_url;
......@@ -37,7 +39,8 @@ if (!class_exists('OAuthConsumer')) {
}
}
class OAuthToken {
class OAuthToken
{
// access tokens and request tokens
public $key;
public $secret;
......@@ -65,7 +68,8 @@ class OAuthToken {
"&oauth_callback_confirmed=true";
}
public function __toString() {
public function __toString()
{
return $this->to_string();
}
}
......@@ -273,7 +277,7 @@ class OAuthRequest
public static $version = '1.0';
public static $POST_INPUT = 'php://input';
public function __construct($http_method, $http_url, $parameters=null)
public function __construct($http_method, $http_url, $parameters = null)
{
$parameters = ($parameters) ? $parameters : array();
$parameters = array_merge(OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
......@@ -747,7 +751,7 @@ class OAuthServer
*/
private function check_timestamp($timestamp)
{
if (! $timestamp) {
if (!$timestamp) {
throw new OAuthException(
'Missing timestamp parameter. The parameter is required'
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment