Completed
Pull Request — master (#9)
by Ionuț
02:08
created
src/Client.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function getRecord($objectType, $sfId, array $fields)
79 79
     {
80
-        $url      = $this->baseUrl . '/services/data/v20.0/sobjects/' . $objectType . '/' . $sfId . '?fields=' . implode(',', $fields);
80
+        $url      = $this->baseUrl.'/services/data/v20.0/sobjects/'.$objectType.'/'.$sfId.'?fields='.implode(',', $fields);
81 81
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
82 82
 
83 83
         return json_decode($response->getBody(), true);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function getBlob($objectType, $sfId, $blobField)
95 95
     {
96
-        $url      = $this->baseUrl . '/services/data/v20.0/sobjects/' . $objectType . '/' . $sfId . '/' . $blobField;
96
+        $url      = $this->baseUrl.'/services/data/v20.0/sobjects/'.$objectType.'/'.$sfId.'/'.$blobField;
97 97
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
98 98
 
99 99
         return $response;
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
     public function search($query = null, $next_url = null)
112 112
     {
113 113
         if ( ! empty($next_url)) {
114
-            $url = $this->baseUrl . '/' . $next_url;
114
+            $url = $this->baseUrl.'/'.$next_url;
115 115
         } else {
116
-            $url = $this->baseUrl . '/services/data/v24.0/query/?q=' . urlencode($query);
116
+            $url = $this->baseUrl.'/services/data/v24.0/query/?q='.urlencode($query);
117 117
         }
118 118
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
119 119
         $data     = json_decode($response->getBody(), true);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function updateRecord($object, $id, array $data)
142 142
     {
143
-        $url = $this->baseUrl . '/services/data/v20.0/sobjects/' . $object . '/' . $id;
143
+        $url = $this->baseUrl.'/services/data/v20.0/sobjects/'.$object.'/'.$id;
144 144
 
145 145
         $this->makeRequest('patch', $url, [
146 146
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function createRecord($object, $data)
162 162
     {
163
-        $url = $this->baseUrl . '/services/data/v20.0/sobjects/' . $object . '/';
163
+        $url = $this->baseUrl.'/services/data/v20.0/sobjects/'.$object.'/';
164 164
 
165
-        $response     = $this->makeRequest('post', $url, [
165
+        $response = $this->makeRequest('post', $url, [
166 166
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
167 167
             'body'    => json_encode($data)
168 168
         ]);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function deleteRecord($object, $id)
183 183
     {
184
-        $url = $this->baseUrl . '/services/data/v20.0/sobjects/' . $object . '/' . $id;
184
+        $url = $this->baseUrl.'/services/data/v20.0/sobjects/'.$object.'/'.$id;
185 185
 
186 186
         $this->makeRequest('delete', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
187 187
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function authorizeConfirm($code, $redirect_url)
200 200
     {
201
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
201
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
202 202
 
203 203
         $post_data = [
204 204
             'grant_type'    => 'authorization_code',
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             'grant_type'    => 'authorization_code'
229 229
         ];
230 230
 
231
-        return $this->salesforceLoginUrl . 'services/oauth2/authorize?' . http_build_query($params);
231
+        return $this->salesforceLoginUrl.'services/oauth2/authorize?'.http_build_query($params);
232 232
     }
233 233
 
234 234
     /**
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     public function refreshToken()
241 241
     {
242
-        $url = $this->salesforceLoginUrl . 'services/oauth2/token';
242
+        $url = $this->salesforceLoginUrl.'services/oauth2/token';
243 243
 
244 244
         $post_data = [
245 245
             'grant_type'    => 'refresh_token',
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     		throw new AuthenticationException(0, "Access token not set");
305 305
     	}
306 306
     	
307
-        return 'Bearer ' . $this->accessToken->getAccessToken();
307
+        return 'Bearer '.$this->accessToken->getAccessToken();
308 308
     }
309 309
 
310 310
 }
Please login to merge, or discard this patch.