Skip to content
Snippets Groups Projects
Unverified Commit 4dc98dfb authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files

Set method visibility / PSR-2

parent a6e5d08a
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ class OAuthToken { ...@@ -65,7 +65,7 @@ class OAuthToken {
"&oauth_callback_confirmed=true"; "&oauth_callback_confirmed=true";
} }
function __toString() { public function __toString() {
return $this->to_string(); return $this->to_string();
} }
} }
...@@ -134,7 +134,7 @@ abstract class OAuthSignatureMethod ...@@ -134,7 +134,7 @@ abstract class OAuthSignatureMethod
*/ */
class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod
{ {
function get_name() public function get_name()
{ {
return "HMAC-SHA1"; return "HMAC-SHA1";
} }
...@@ -286,7 +286,7 @@ class OAuthRequest ...@@ -286,7 +286,7 @@ class OAuthRequest
/** /**
* attempt to build up a request from what was passed to the server * attempt to build up a request from what was passed to the server
*/ */
public static function from_request($http_method=NULL, $http_url=null, $parameters=null) public static function from_request($http_method = null, $http_url = null, $parameters = null)
{ {
$scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
? 'http' ? 'http'
...@@ -339,7 +339,7 @@ class OAuthRequest ...@@ -339,7 +339,7 @@ class OAuthRequest
/** /**
* pretty much a helper function to set up the request * pretty much a helper function to set up the request
*/ */
public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=null) public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters = null)
{ {
$parameters = ($parameters) ? $parameters : array(); $parameters = ($parameters) ? $parameters : array();
$defaults = array("oauth_version" => OAuthRequest::$version, $defaults = array("oauth_version" => OAuthRequest::$version,
...@@ -767,7 +767,7 @@ class OAuthServer ...@@ -767,7 +767,7 @@ class OAuthServer
*/ */
private function check_nonce($consumer, $token, $nonce, $timestamp) private function check_nonce($consumer, $token, $nonce, $timestamp)
{ {
if (! $nonce) { if (!$nonce) {
throw new OAuthException( throw new OAuthException(
'Missing nonce parameter. The parameter is required' 'Missing nonce 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