Completed
Push — master ( 453f6e...4762fe )
by
unknown
01:33
created
src/SalesforceServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/SalesforceAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Objects/AbstractObject.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
     /**
129 129
      * Run Salesforce query.
130 130
      *
131
-     * @param $query
131
+     * @param string $query
132 132
      *
133 133
      * @return mixed
134 134
      */
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
192 192
      */
193 193
     public function create(array $params)
194 194
     {
195
-        $response = $this->sendRequest('POST', "/sobjects/" . $this->getType(), [
195
+        $response = $this->sendRequest('POST', "/sobjects/".$this->getType(), [
196 196
             'json' => $params,
197 197
         ]);
198 198
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Objects/Payment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Objects/Lead.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Salesforce.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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]);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     private function callDeleteOnObject($method, $args)
100 100
     {
101 101
         $type = substr($method, 6);
102
-        $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type;
102
+        $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type;
103 103
 
104 104
         if (class_exists($class)) {
105 105
             return (new $class($this))->delete($args[0]);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     private function callGetOnObject($method, $args)
112 112
     {
113 113
         $type = substr($method, 3);
114
-        $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type;
114
+        $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type;
115 115
 
116 116
         if (class_exists($class)) {
117 117
             return (new $class($this))->get($args[0]);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     private function callInitObject($method)
124 124
     {
125 125
         $type = substr($method, 4);
126
-        $class = '\\Surge\\LaravelSalesforce\\Objects\\' . $type;
126
+        $class = '\\Surge\\LaravelSalesforce\\Objects\\'.$type;
127 127
 
128 128
         if (class_exists($class)) {
129 129
             return new $class($this);
Please login to merge, or discard this patch.