@@ -23,7 +23,7 @@ |
||
23 | 23 | * ] |
24 | 24 | * |
25 | 25 | * |
26 | - * @param array $param to search |
|
26 | + * @param array $params to search |
|
27 | 27 | * @return bool|array |
28 | 28 | */ |
29 | 29 | public function exists($params) |
@@ -28,14 +28,14 @@ |
||
28 | 28 | */ |
29 | 29 | public function exists($params) |
30 | 30 | { |
31 | - if(empty($params)) { |
|
31 | + if (empty($params)) { |
|
32 | 32 | return false; |
33 | 33 | } |
34 | 34 | |
35 | - $query = 'SELECT Id, OwnerId FROM ' . $this->getType() . ' WHERE RecordTypeId = \'' . config('laravel-salesforce.record_type.account') . '\''; |
|
35 | + $query = 'SELECT Id, OwnerId FROM '.$this->getType().' WHERE RecordTypeId = \''.config('laravel-salesforce.record_type.account').'\''; |
|
36 | 36 | |
37 | - foreach($params as $fieldName => $fieldValue) { |
|
38 | - $query .= ' AND ' . $fieldName . '=\'' . addslashes(trim($fieldValue)) . '\''; |
|
37 | + foreach ($params as $fieldName => $fieldValue) { |
|
38 | + $query .= ' AND '.$fieldName.'=\''.addslashes(trim($fieldValue)).'\''; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $response = $this->query($query); |
@@ -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], $args[1]); |
@@ -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 callExistsOnObject($method, $args) |
123 | 123 | { |
124 | 124 | $type = substr($method, 6); |
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))->exists($args[0]); |