From b76ea672ae176ca85578fe5b6e6061ac1f4ee0ac Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Fri, 11 May 2018 12:17:09 +0200 Subject: [PATCH] PSR-2 --- modules/oauth/libextinc/OAuth.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/oauth/libextinc/OAuth.php b/modules/oauth/libextinc/OAuth.php index ee30a0dff..c269b993d 100644 --- a/modules/oauth/libextinc/OAuth.php +++ b/modules/oauth/libextinc/OAuth.php @@ -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' ); -- GitLab