@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | private function callCreateOnObject($method, $args) |
75 | 75 | { |
76 | 76 | $type = substr($method, 6); |
77 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
77 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
78 | 78 | |
79 | 79 | if (class_exists($class)) { |
80 | 80 | return (new $class($this))->create($args[0]); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | private function callUpdateOnObject($method, $args) |
87 | 87 | { |
88 | 88 | $type = substr($method, 6); |
89 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
89 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
90 | 90 | |
91 | 91 | if (class_exists($class)) { |
92 | 92 | return (new $class($this))->update($args[0]); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | private function callDeleteOnObject($method, $args) |
99 | 99 | { |
100 | 100 | $type = substr($method, 6); |
101 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
101 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
102 | 102 | |
103 | 103 | if (class_exists($class)) { |
104 | 104 | return (new $class($this))->delete($args[0]); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | private function callGetOnObject($method, $args) |
111 | 111 | { |
112 | 112 | $type = substr($method, 3); |
113 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
113 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
114 | 114 | |
115 | 115 | if (class_exists($class)) { |
116 | 116 | return (new $class($this))->get($args[0]); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | private function callInitObject($method) |
123 | 123 | { |
124 | 124 | $type = substr($method, 4); |
125 | - $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type; |
|
125 | + $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type; |
|
126 | 126 | |
127 | 127 | if (class_exists($class)) { |
128 | 128 | return new $class($this); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | public function getAllByOpportunityId($opportunityId) |
11 | 11 | { |
12 | - $query = 'Select Id, Name, Opportunity__c, Net_amount__c, Payment_Date__c, Gross_Amount__c From ' . $this->getType() . '__c Where Opportunity__c = \'' . $opportunityId . '\' And IsDeleted = false'; |
|
12 | + $query = 'Select Id, Name, Opportunity__c, Net_amount__c, Payment_Date__c, Gross_Amount__c From '.$this->getType().'__c Where Opportunity__c = \''.$opportunityId.'\' And IsDeleted = false'; |
|
13 | 13 | |
14 | 14 | $response = $this->query($query); |
15 | 15 |
@@ -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 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getAllByOpportunityId($opportunityId) |
124 | 124 | { |
125 | - $query = 'Select Id, Name, Opportunity__c, Net_amount__c, Payment_Date__c, Gross_Amount__c From ' . $this->getType() . ' Where Opportunity__c = \'' . $opportunityId . '\' And IsDeleted = false'; |
|
125 | + $query = 'Select Id, Name, Opportunity__c, Net_amount__c, Payment_Date__c, Gross_Amount__c From '.$this->getType().' Where Opportunity__c = \''.$opportunityId.'\' And IsDeleted = false'; |
|
126 | 126 | |
127 | 127 | $response = $this->query($query); |
128 | 128 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function get(string $id, array $fields = []) |
160 | 160 | { |
161 | - return $this->sendRequest('GET', "/sobjects/" . $this->getType() . "/$id", ['query' => $fields]); |
|
161 | + return $this->sendRequest('GET', "/sobjects/".$this->getType()."/$id", ['query' => $fields]); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function update(string $id, array $params) |
172 | 172 | { |
173 | - $response = $this->sendRequest('PATCH', "/sobjects/" . $this->getType() . "/$id", |
|
173 | + $response = $this->sendRequest('PATCH', "/sobjects/".$this->getType()."/$id", |
|
174 | 174 | [ |
175 | 175 | 'json' => $params, |
176 | 176 | ] |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function create(array $params) |
194 | 194 | { |
195 | - $response = $this->sendRequest('POST', "/sobject/" . $this->getType(), [ |
|
195 | + $response = $this->sendRequest('POST', "/sobject/".$this->getType(), [ |
|
196 | 196 | 'json' => $params, |
197 | 197 | ]); |
198 | 198 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function delete(string $id) |
213 | 213 | { |
214 | - $response = $this->sendRequest('DELETE', "/sobjects/" . $this->getType() . "/$id"); |
|
214 | + $response = $this->sendRequest('DELETE', "/sobjects/".$this->getType()."/$id"); |
|
215 | 215 | |
216 | 216 | if ($response->success !== true) { |
217 | 217 | throw new SalesforceException($response->errors); |
@@ -32,12 +32,12 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | if ($email !== null) { |
35 | - $query = 'SELECT Id, OwnerId FROM ' . $this->getType() . ' WHERE Email = \'' . addslashes(trim($email)) . '\''; |
|
35 | + $query = 'SELECT Id, OwnerId FROM '.$this->getType().' WHERE Email = \''.addslashes(trim($email)).'\''; |
|
36 | 36 | } else { |
37 | - $query = 'SELECT Id, OwnerId FROM ' . $this->getType() . ' WHERE Phone = \'' . addslashes(trim($phone)) . '\''; |
|
37 | + $query = 'SELECT Id, OwnerId FROM '.$this->getType().' WHERE Phone = \''.addslashes(trim($phone)).'\''; |
|
38 | 38 | } |
39 | 39 | |
40 | - $query .= ' AND RecordTypeId = \'' . config('laravel-salesforce.record_type.lead') . '\''; |
|
40 | + $query .= ' AND RecordTypeId = \''.config('laravel-salesforce.record_type.lead').'\''; |
|
41 | 41 | |
42 | 42 | $response = $this->query($query); |
43 | 43 |