@@ -76,7 +76,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | public function bulkDeleteRecords(array $ids) |
| 185 | 185 | { |
| 186 | - $url = $this->baseUrl . '/services/data/v20.0/composite/sobjects?ids=' . \implode($ids, ','); |
|
| 186 | + $url = $this->baseUrl.'/services/data/v20.0/composite/sobjects?ids='.\implode($ids, ','); |
|
| 187 | 187 | |
| 188 | 188 | $this->makeRequest('delete', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]); |
| 189 | 189 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function login($username, $password) |
| 202 | 202 | { |
| 203 | - $url = $this->salesforceLoginUrl . 'services/oauth2/token'; |
|
| 203 | + $url = $this->salesforceLoginUrl.'services/oauth2/token'; |
|
| 204 | 204 | |
| 205 | 205 | $post_data = [ |
| 206 | 206 | 'grant_type' => 'password', |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | public function authorizeConfirm($code, $redirect_url) |
| 227 | 227 | { |
| 228 | - $url = $this->salesforceLoginUrl . 'services/oauth2/token'; |
|
| 228 | + $url = $this->salesforceLoginUrl.'services/oauth2/token'; |
|
| 229 | 229 | |
| 230 | 230 | $post_data = [ |
| 231 | 231 | 'grant_type' => 'authorization_code', |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | 'grant_type' => 'authorization_code' |
| 256 | 256 | ]; |
| 257 | 257 | |
| 258 | - return $this->salesforceLoginUrl . 'services/oauth2/authorize?' . http_build_query($params); |
|
| 258 | + return $this->salesforceLoginUrl.'services/oauth2/authorize?'.http_build_query($params); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | */ |
| 267 | 267 | public function refreshToken() |
| 268 | 268 | { |
| 269 | - $url = $this->salesforceLoginUrl . 'services/oauth2/token'; |
|
| 269 | + $url = $this->salesforceLoginUrl.'services/oauth2/token'; |
|
| 270 | 270 | |
| 271 | 271 | $post_data = [ |
| 272 | 272 | 'grant_type' => 'refresh_token', |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | throw new AuthenticationException(0, "Access token not set"); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - return 'Bearer ' . $this->accessToken->getAccessToken(); |
|
| 334 | + return 'Bearer '.$this->accessToken->getAccessToken(); |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | } |