Completed
Pull Request — master (#14)
by
unknown
01:34
created
src/Client.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function getRecord($objectType, $sfId, array $fields)
78 78
     {
79
-        $url      = $this->baseUrl . '/services/data/v20.0/sobjects/' . $objectType . '/' . $sfId . '?fields=' . implode(',', $fields);
79
+        $url      = $this->baseUrl.'/services/data/v20.0/sobjects/'.$objectType.'/'.$sfId.'?fields='.implode(',', $fields);
80 80
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
81 81
 
82 82
         return json_decode($response->getBody(), true);
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
     public function search($query = null, $next_url = null)
95 95
     {
96 96
         if ( ! empty($next_url)) {
97
-            $url = $this->baseUrl . '/' . $next_url;
97
+            $url = $this->baseUrl.'/'.$next_url;
98 98
         } else {
99
-            $url = $this->baseUrl . '/services/data/v24.0/query/?q=' . urlencode($query);
99
+            $url = $this->baseUrl.'/services/data/v24.0/query/?q='.urlencode($query);
100 100
         }
101 101
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
102 102
         $data     = json_decode($response->getBody(), true);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function updateRecord($object, $id, array $data)
125 125
     {
126
-        $url = $this->baseUrl . '/services/data/v20.0/sobjects/' . $object . '/' . $id;
126
+        $url = $this->baseUrl.'/services/data/v20.0/sobjects/'.$object.'/'.$id;
127 127
 
128 128
         $this->makeRequest('patch', $url, [
129 129
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
      */
144 144
     public function createRecord($object, $data)
145 145
     {
146
-        $url = $this->baseUrl . '/services/data/v20.0/sobjects/' . $object . '/';
146
+        $url = $this->baseUrl.'/services/data/v20.0/sobjects/'.$object.'/';
147 147
 
148
-        $response     = $this->makeRequest('post', $url, [
148
+        $response = $this->makeRequest('post', $url, [
149 149
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
150 150
             'body'    => json_encode($data)
151 151
         ]);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function deleteRecord($object, $id)
166 166
     {
167
-        $url = $this->baseUrl . '/services/data/v20.0/sobjects/' . $object . '/' . $id;
167
+        $url = $this->baseUrl.'/services/data/v20.0/sobjects/'.$object.'/'.$id;
168 168
 
169 169
         $this->makeRequest('delete', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
170 170
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function login($username, $password)
183 183
     {
184
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
184
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
185 185
 
186 186
         $post_data = [
187 187
             'grant_type'    => 'password',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function authorizeConfirm($code, $redirect_url)
208 208
     {
209
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
209
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
210 210
 
211 211
         $post_data = [
212 212
             'grant_type'    => 'authorization_code',
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             'grant_type'    => 'authorization_code'
237 237
         ];
238 238
 
239
-        return $this->salesforceLoginUrl . 'services/oauth2/authorize?' . http_build_query($params);
239
+        return $this->salesforceLoginUrl.'services/oauth2/authorize?'.http_build_query($params);
240 240
     }
241 241
 
242 242
     /**
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function refreshToken()
249 249
     {
250
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
250
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
251 251
 
252 252
         $post_data = [
253 253
             'grant_type'    => 'refresh_token',
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     		throw new AuthenticationException(0, "Access token not set");
313 313
     	}
314 314
     	
315
-        return 'Bearer ' . $this->accessToken->getAccessToken();
315
+        return 'Bearer '.$this->accessToken->getAccessToken();
316 316
     }
317 317
 
318 318
 }
Please login to merge, or discard this patch.