Completed
Branch master (b0dfbb)
by Brian
02:41
created
src/AccessTokenGenerator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     /**
8 8
      * Create an access token from stored json data
9 9
      *
10
-     * @param $text
10
+     * @param string $text
11 11
      * @return AccessToken
12 12
      */
13 13
     public function createFromJson($text)
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     /**
93 93
      * @param array $array
94
-     * @param mixed $key
94
+     * @param string $key
95 95
      * @return null
96 96
      */
97 97
     private function getKeyIfSet($array, $key)
Please login to merge, or discard this patch.
src/Client.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
         } catch (GuzzleRequestException $e) {
286 286
             
287 287
             if ($e->getResponse() === null) {
288
-        		throw $e;
289
-        	}
288
+          throw $e;
289
+         }
290 290
 
291 291
             //If its an auth error convert to an auth exception
292 292
             if ($e->getResponse()->getStatusCode() == 401) {
@@ -304,8 +304,8 @@  discard block
 block discarded – undo
304 304
     private function getAuthHeader()
305 305
     {
306 306
         if ($this->accessToken === null) {
307
-    		throw new AuthenticationException(0, "Access token not set");
308
-    	}
307
+      throw new AuthenticationException(0, "Access token not set");
308
+     }
309 309
     	
310 310
         return 'Bearer ' . $this->accessToken->getAccessToken();
311 311
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getRecord($objectType, $sfId, array $fields)
83 83
     {
84
-        $url      = $this->baseUrl . "/services/data/v{$this->version}/sobjects/{$objectType}/{$sfId}?fields=".implode(',', $fields);
84
+        $url      = $this->baseUrl . "/services/data/v{$this->version}/sobjects/{$objectType}/{$sfId}?fields=" . implode(',', $fields);
85 85
         $response = $this->makeRequest('get', $url, ['headers' => ['Authorization' => $this->getAuthHeader()]]);
86 86
 
87 87
         return json_decode($response->getBody(), true);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $url = $this->baseUrl . "/services/data/v{$this->version}/sobjects/{$object}/";
167 167
 
168
-        $response     = $this->makeRequest('post', $url, [
168
+        $response = $this->makeRequest('post', $url, [
169 169
             'headers' => ['Content-Type' => 'application/json', 'Authorization' => $this->getAuthHeader()],
170 170
             'body'    => json_encode($data)
171 171
         ]);
Please login to merge, or discard this patch.