@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function register() |
| 11 | 11 | { |
| 12 | - $this->app->singleton('salesforce', function () { |
|
| 12 | + $this->app->singleton('salesforce', function() { |
|
| 13 | 13 | $authClient = new Client([ |
| 14 | 14 | 'headers' => [ |
| 15 | 15 | 'Accept' => 'application/json', |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | $this->id = $responseObject->id; |
| 84 | 84 | $this->accessToken = $responseObject->access_token; |
| 85 | 85 | $this->instanceUrl = $responseObject->instance_url; |
| 86 | - $this->url = $responseObject->instance_url . $this->version['url']; |
|
| 86 | + $this->url = $responseObject->instance_url.$this->version['url']; |
|
| 87 | 87 | |
| 88 | 88 | if ($this->accessToken !== null) { |
| 89 | 89 | $this->authenticated = true; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | private function callCreateOnObject($method, $args) |
| 72 | 72 | { |
| 73 | 73 | $type = substr($method, 6); |
| 74 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
| 74 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
| 75 | 75 | |
| 76 | 76 | if (class_exists($class)) { |
| 77 | 77 | return (new $class($this))->create($args[0]); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | private function callUpdateOnObject($method, $args) |
| 84 | 84 | { |
| 85 | 85 | $type = substr($method, 6); |
| 86 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
| 86 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
| 87 | 87 | |
| 88 | 88 | if (class_exists($class)) { |
| 89 | 89 | return (new $class($this))->update($args[0]); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | private function callDeleteOnObject($method, $args) |
| 96 | 96 | { |
| 97 | 97 | $type = substr($method, 6); |
| 98 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
| 98 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
| 99 | 99 | |
| 100 | 100 | if (class_exists($class)) { |
| 101 | 101 | return (new $class($this))->delete($args[0]); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | private function callGetOnObject($method, $args) |
| 108 | 108 | { |
| 109 | 109 | $type = substr($method, 3); |
| 110 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
| 110 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
| 111 | 111 | |
| 112 | 112 | if (class_exists($class)) { |
| 113 | 113 | return (new $class($this))->get($args[0]); |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | /** |
| 129 | 129 | * Run Salesforce query. |
| 130 | 130 | * |
| 131 | - * @param $query |
|
| 131 | + * @param string $query |
|
| 132 | 132 | * |
| 133 | 133 | * @return mixed |
| 134 | 134 | */ |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | ])); |
| 34 | 34 | |
| 35 | 35 | $response = json_decode( |
| 36 | - $this->salesforce->client->request($method, $this->salesforce->baseUrl . $url, $options) |
|
| 36 | + $this->salesforce->client->request($method, $this->salesforce->baseUrl.$url, $options) |
|
| 37 | 37 | ->getBody()); |
| 38 | 38 | |
| 39 | 39 | event(new ResponseReceived([ |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function getVersion() |
| 64 | 64 | { |
| 65 | - return $this->sendRequest('GET', $this->salesforce->instanceUrl . '/services/data'); |
|
| 65 | + return $this->sendRequest('GET', $this->salesforce->instanceUrl.'/services/data'); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function listOrganisationLimits() |
| 72 | 72 | { |
| 73 | - return $this->sendRequest('GET', $this->salesforce->instanceUrl . $this->version['url'] . '/limits'); |
|
| 73 | + return $this->sendRequest('GET', $this->salesforce->instanceUrl.$this->version['url'].'/limits'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function describeObject($objectName) |
| 104 | 104 | { |
| 105 | - return $this->sendRequest('GET', '/sobjects/' . $objectName . '/describe'); |
|
| 105 | + return $this->sendRequest('GET', '/sobjects/'.$objectName.'/describe'); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function describeBasicObject($objectName) |
| 116 | 116 | { |
| 117 | - return $this->sendRequest('GET', '/sobjects/' . $objectName); |
|
| 117 | + return $this->sendRequest('GET', '/sobjects/'.$objectName); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | return $this->sendRequest( |
| 131 | 131 | 'GET', |
| 132 | - '/analytics/reports/' . $id, |
|
| 132 | + '/analytics/reports/'.$id, |
|
| 133 | 133 | ['query' => ['includeDetails' => $includeDetails]] |
| 134 | 134 | ); |
| 135 | 135 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public function get(string $id, array $fields = []) |
| 161 | 161 | { |
| 162 | - return $this->sendRequest('GET', "/sobjects/" . $this->getType() . "/$id", ['query' => $fields]); |
|
| 162 | + return $this->sendRequest('GET', "/sobjects/".$this->getType()."/$id", ['query' => $fields]); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | public function update(string $id, array $params) |
| 173 | 173 | { |
| 174 | - $response = $this->sendRequest('PATCH', "/sobjects/" . $this->getType() . "/$id", |
|
| 174 | + $response = $this->sendRequest('PATCH', "/sobjects/".$this->getType()."/$id", |
|
| 175 | 175 | [ |
| 176 | 176 | 'json' => $params, |
| 177 | 177 | ] |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | public function create(array $params) |
| 195 | 195 | { |
| 196 | - $response = $this->sendRequest('POST', "/sobject/" . $this->getType(), [ |
|
| 196 | + $response = $this->sendRequest('POST', "/sobject/".$this->getType(), [ |
|
| 197 | 197 | 'json' => $params, |
| 198 | 198 | ]); |
| 199 | 199 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function delete(string $id) |
| 214 | 214 | { |
| 215 | - $response = $this->sendRequest('DELETE', "/sobjects/" . $this->getType() . "/$id"); |
|
| 215 | + $response = $this->sendRequest('DELETE', "/sobjects/".$this->getType()."/$id"); |
|
| 216 | 216 | |
| 217 | 217 | if ($response->success !== true) { |
| 218 | 218 | throw new SalesforceException($response->errors); |