Completed
Pull Request — master (#14)
by
unknown
02:09
created
src/Client.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function getRecord($objectType, $sfId, array $fields)
82 82
     {
83
-        $url      = $this->baseUrl . '/services/data/' . self::SALESFORCE_API_VERSION . '/sobjects/' . $objectType . '/' . $sfId . '?fields=' . implode(',', $fields);
83
+        $url      = $this->baseUrl.'/services/data/'.self::SALESFORCE_API_VERSION.'/sobjects/'.$objectType.'/'.$sfId.'?fields='.implode(',', $fields);
84 84
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
85 85
 
86 86
         return json_decode($response->getBody(), true);
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
     public function search($query = null, $next_url = null)
99 99
     {
100 100
         if ( ! empty($next_url)) {
101
-            $url = $this->baseUrl . '/' . $next_url;
101
+            $url = $this->baseUrl.'/'.$next_url;
102 102
         } else {
103
-            $url = $this->baseUrl . '/services/data/v24.0/query/?q=' . urlencode($query);
103
+            $url = $this->baseUrl.'/services/data/v24.0/query/?q='.urlencode($query);
104 104
         }
105 105
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
106 106
         $data     = json_decode($response->getBody(), true);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function updateRecord($object, $id, array $data)
129 129
     {
130
-        $url = $this->baseUrl . '/services/data/' . self::SALESFORCE_API_VERSION . '/sobjects/' . $object . '/' . $id;
130
+        $url = $this->baseUrl.'/services/data/'.self::SALESFORCE_API_VERSION.'/sobjects/'.$object.'/'.$id;
131 131
 
132 132
         $this->makeRequest('patch', $url, [
133 133
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function createRecord($object, $data)
149 149
     {
150
-        $url = $this->baseUrl . '/services/data/' . self::SALESFORCE_API_VERSION . '/sobjects/' . $object . '/';
150
+        $url = $this->baseUrl.'/services/data/'.self::SALESFORCE_API_VERSION.'/sobjects/'.$object.'/';
151 151
 
152
-        $response     = $this->makeRequest('post', $url, [
152
+        $response = $this->makeRequest('post', $url, [
153 153
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
154 154
             'body'    => json_encode($data)
155 155
         ]);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     public function deleteRecord($object, $id)
170 170
     {
171
-        $url = $this->baseUrl . '/services/data/' . self::SALESFORCE_API_VERSION . '/sobjects/' . $object . '/' . $id;
171
+        $url = $this->baseUrl.'/services/data/'.self::SALESFORCE_API_VERSION.'/sobjects/'.$object.'/'.$id;
172 172
 
173 173
         $this->makeRequest('delete', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
174 174
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function bulkDeleteRecords(array $ids)
189 189
     {
190
-        $url = $this->baseUrl . '/services/data/' . self::SALESFORCE_API_VERSION . '/composite/sobjects?ids=' . \implode(',', $ids);
190
+        $url = $this->baseUrl.'/services/data/'.self::SALESFORCE_API_VERSION.'/composite/sobjects?ids='.\implode(',', $ids);
191 191
 
192 192
         $this->makeRequest('delete', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
193 193
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     public function login($username, $password)
206 206
     {
207
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
207
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
208 208
 
209 209
         $post_data = [
210 210
             'grant_type'    => 'password',
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      */
230 230
     public function authorizeConfirm($code, $redirect_url)
231 231
     {
232
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
232
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
233 233
 
234 234
         $post_data = [
235 235
             'grant_type'    => 'authorization_code',
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             'grant_type'    => 'authorization_code'
260 260
         ];
261 261
 
262
-        return $this->salesforceLoginUrl . 'services/oauth2/authorize?' . http_build_query($params);
262
+        return $this->salesforceLoginUrl.'services/oauth2/authorize?'.http_build_query($params);
263 263
     }
264 264
 
265 265
     /**
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function refreshToken()
272 272
     {
273
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
273
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
274 274
 
275 275
         $post_data = [
276 276
             'grant_type'    => 'refresh_token',
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
     		throw new AuthenticationException(0, "Access token not set");
336 336
     	}
337 337
     	
338
-        return 'Bearer ' . $this->accessToken->getAccessToken();
338
+        return 'Bearer '.$this->accessToken->getAccessToken();
339 339
     }
340 340
 
341 341
 }
Please login to merge, or discard this patch.