Completed
Branch develop (2dd6cc)
by
unknown
26:03
created
htdocs/includes/OAuth/OAuth2/Service/Yammer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         if (null === $data || !is_array($data)) {
61 61
             throw new TokenResponseException('Unable to parse response.');
62 62
         } elseif (isset($data['error'])) {
63
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
63
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
64 64
         }
65 65
 
66 66
         $token = new StdOAuth2Token();
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/AbstractService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         foreach ($scopes as $scope) {
59 59
         	if (!$this->isValidScope($scope)) {
60
-        		throw new InvalidScopeException('Scope ' . $scope . ' is not valid for service ' . get_class($this));
60
+        		throw new InvalidScopeException('Scope '.$scope.' is not valid for service '.get_class($this));
61 61
             }
62 62
         }
63 63
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         // add the token where it may be needed
167 167
         if (static::AUTHORIZATION_METHOD_HEADER_OAUTH === $this->getAuthorizationMethod()) {
168
-            $extraHeaders = array_merge(array('Authorization' => 'OAuth ' . $token->getAccessToken()), $extraHeaders);
168
+            $extraHeaders = array_merge(array('Authorization' => 'OAuth '.$token->getAccessToken()), $extraHeaders);
169 169
         } elseif (static::AUTHORIZATION_METHOD_QUERY_STRING === $this->getAuthorizationMethod()) {
170 170
             $uri->addToQuery('access_token', $token->getAccessToken());
171 171
         } elseif (static::AUTHORIZATION_METHOD_QUERY_STRING_V2 === $this->getAuthorizationMethod()) {
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         } elseif (static::AUTHORIZATION_METHOD_QUERY_STRING_V4 === $this->getAuthorizationMethod()) {
176 176
             $uri->addToQuery('auth', $token->getAccessToken());
177 177
         } elseif (static::AUTHORIZATION_METHOD_HEADER_BEARER === $this->getAuthorizationMethod()) {
178
-            $extraHeaders = array_merge(array('Authorization' => 'Bearer ' . $token->getAccessToken()), $extraHeaders);
178
+            $extraHeaders = array_merge(array('Authorization' => 'Bearer '.$token->getAccessToken()), $extraHeaders);
179 179
         }
180 180
 
181 181
         $extraHeaders = array_merge($this->getExtraApiHeaders(), $extraHeaders);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
      */
350 350
     protected function getApiVersionString()
351 351
     {
352
-        return !(empty($this->apiVersion)) ? "/".$this->apiVersion : "" ;
352
+        return !(empty($this->apiVersion)) ? "/".$this->apiVersion : "";
353 353
     }
354 354
 
355 355
     /**
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Salesforce.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @var string
20 20
      */
21
-    const   SCOPE_API           =   'api',
22
-            SCOPE_REFRESH_TOKEN =   'refresh_token';
21
+    const   SCOPE_API           = 'api',
22
+            SCOPE_REFRESH_TOKEN = 'refresh_token';
23 23
 
24 24
     /**
25 25
      * {@inheritdoc}
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (null === $data || !is_array($data)) {
64 64
             throw new TokenResponseException('Unable to parse response.');
65 65
         } elseif (isset($data['error'])) {
66
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
66
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
67 67
         }
68 68
 
69 69
         $token = new StdOAuth2Token();
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Harvest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,10 +83,10 @@
 block discarded – undo
83 83
     {
84 84
         $data = json_decode($responseBody, true);
85 85
 
86
-        if (null === $data || ! is_array($data)) {
86
+        if (null === $data || !is_array($data)) {
87 87
             throw new TokenResponseException('Unable to parse response.');
88 88
         } elseif (isset($data['error'])) {
89
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
89
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
90 90
         }
91 91
 
92 92
         $token = new StdOAuth2Token();
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Facebook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         if (null === $data || !is_array($data)) {
165 165
             throw new TokenResponseException('Unable to parse response.');
166 166
         } elseif (isset($data['error'])) {
167
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
167
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
168 168
         }
169 169
 
170 170
         $token = new StdOAuth2Token();
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
             throw new Exception("Redirect uri is mandatory for this request");
194 194
         }
195 195
         $parameters['app_id'] = $this->credentials->getConsumerId();
196
-        $baseUrl = self::WWW_URL .$this->getApiVersionString(). '/dialog/' . $dialogPath;
196
+        $baseUrl = self::WWW_URL.$this->getApiVersionString().'/dialog/'.$dialogPath;
197 197
         $query = http_build_query($parameters);
198
-        return new Uri($baseUrl . '?' . $query);
198
+        return new Uri($baseUrl.'?'.$query);
199 199
     }
200 200
 
201 201
     /**
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Microsoft.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
         if (null === $data || !is_array($data)) {
120 120
             throw new TokenResponseException('Unable to parse response.');
121 121
         } elseif (isset($data['error'])) {
122
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
122
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
123 123
         }
124 124
         //print $data['access_token'];exit;
125 125
 
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Paypal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,9 +79,9 @@
 block discarded – undo
79 79
         if (null === $data || !is_array($data)) {
80 80
             throw new TokenResponseException('Unable to parse response.');
81 81
         } elseif (isset($data['message'])) {
82
-            throw new TokenResponseException('Error in retrieving token: "' . $data['message'] . '"');
82
+            throw new TokenResponseException('Error in retrieving token: "'.$data['message'].'"');
83 83
         } elseif (isset($data['name'])) {
84
-            throw new TokenResponseException('Error in retrieving token: "' . $data['name'] . '"');
84
+            throw new TokenResponseException('Error in retrieving token: "'.$data['name'].'"');
85 85
         }
86 86
 
87 87
         $token = new StdOAuth2Token();
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Yahoo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             throw new TokenResponseException('Unable to parse response.');
46 46
         } elseif (isset($data['error']))
47 47
         {
48
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
48
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
49 49
         }
50 50
 
51 51
         $token = new StdOAuth2Token();
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
     */
72 72
     protected function getExtraOAuthHeaders()
73 73
     {
74
-        $encodedCredentials = base64_encode($this->credentials->getConsumerId() . ':' . $this->credentials->getConsumerSecret());
75
-        return array('Authorization' => 'Basic ' . $encodedCredentials);
74
+        $encodedCredentials = base64_encode($this->credentials->getConsumerId().':'.$this->credentials->getConsumerSecret());
75
+        return array('Authorization' => 'Basic '.$encodedCredentials);
76 76
     }
77 77
 
78 78
 }
Please login to merge, or discard this patch.
htdocs/includes/OAuth/OAuth2/Service/Mailchimp.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         if (null === $data || !is_array($data)) {
63 63
             throw new TokenResponseException('Unable to parse response.');
64 64
         } elseif (isset($data['error'])) {
65
-            throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '"');
65
+            throw new TokenResponseException('Error in retrieving token: "'.$data['error'].'"');
66 66
         }
67 67
 
68 68
         // Create token object.
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     protected function setBaseApiUri(StdOAuth2Token $token)
98 98
     {
99 99
         // Make request uri.
100
-        $endpoint = 'https://login.mailchimp.com/oauth2/metadata?oauth_token='. $token->getAccessToken();
100
+        $endpoint = 'https://login.mailchimp.com/oauth2/metadata?oauth_token='.$token->getAccessToken();
101 101
 
102 102
         // Grab meta data about the token.
103 103
         $response = $this->httpClient->retrieveResponse(new Uri($endpoint), array(), array(), 'GET');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $meta = json_decode($response, true);
107 107
 
108 108
         // Set base api uri.
109
-        $this->baseApiUri = new Uri('https://'. $meta['dc'] .'.api.mailchimp.com/2.0/');
109
+        $this->baseApiUri = new Uri('https://'.$meta['dc'].'.api.mailchimp.com/2.0/');
110 110
 
111 111
         // Allow chaining.
112 112
         return $this;
Please login to merge, or discard this patch.