From 712c731a4835b4dd7ddb5a622fb0526fbb0df7ed Mon Sep 17 00:00:00 2001 From: Justin Voelkel Date: Fri, 7 Oct 2016 16:35:55 -0400 Subject: [PATCH] addressing inline control structures --- src/MaxCDN/OAuth/OAuthUtil.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/MaxCDN/OAuth/OAuthUtil.php b/src/MaxCDN/OAuth/OAuthUtil.php index ac0dff6..897c625 100644 --- a/src/MaxCDN/OAuth/OAuthUtil.php +++ b/src/MaxCDN/OAuth/OAuthUtil.php @@ -5,7 +5,7 @@ class OAuthUtil { public static function urlencode_rfc3986($input) { if (is_array($input)) { return array_map(array('\MaxCDN\OAuth\OAuthUtil', 'urlencode_rfc3986'), $input); - } else if (is_scalar($input)) { + } elseif (is_scalar($input)) { return str_replace( '+', ' ', @@ -92,7 +92,9 @@ public static function get_headers() { // parameters like this // array('a' => array('b','c'), 'd' => 'e') public static function parse_parameters( $input ) { - if (!isset($input) || !$input) return array(); + if (!isset($input) || !$input) { + return array(); + } $pairs = explode('&', $input); @@ -121,7 +123,9 @@ public static function parse_parameters( $input ) { } public static function build_http_query($params) { - if (!$params) return ''; + if (!$params) { + return ''; + } // Urlencode both keys and values $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));