@@ -264,7 +264,7 @@ |
||
| 264 | 264 | |
| 265 | 265 | try { |
| 266 | 266 | $this->setQuoteWeight(); |
| 267 | - $promise = $client->callAsync('calculaFrete', $this->buildRequest())->then(function ($response) { |
|
| 267 | + $promise = $client->callAsync('calculaFrete', $this->buildRequest())->then(function($response) { |
|
| 268 | 268 | $this->parseResult($response); |
| 269 | 269 | }); |
| 270 | 270 | $promise->wait(); |
@@ -256,7 +256,7 @@ |
||
| 256 | 256 | */ |
| 257 | 257 | private function strRemoveSpecialChars(string $string): string |
| 258 | 258 | { |
| 259 | - return html_entity_decode(preg_replace('/&([a-zA-Z])(uml|acute|grave|circ|tilde|cedil|lig);/','$1',htmlentities($this->strNormalize($string), ENT_COMPAT, "UTF-8"))); |
|
| 259 | + return html_entity_decode(preg_replace('/&([a-zA-Z])(uml|acute|grave|circ|tilde|cedil|lig);/', '$1', htmlentities($this->strNormalize($string), ENT_COMPAT, "UTF-8"))); |
|
| 260 | 260 | // return $this->strNormalize(preg_replace('/[^\w\s]/', '', iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', preg_replace('/[^\pL\pN]/u', ' ', $this->strNormalize($string))))); //don't work properly with iconv glibc only with libiconv |
| 261 | 261 | |
| 262 | 262 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $client = $factory->create(new Client(), 'http://201.48.198.97/calculador/CalcPrecoPrazo.asmx?WSDL'); |
| 25 | 25 | try { |
| 26 | 26 | $this->setQuoteWeight(); |
| 27 | - $promise = $client->callAsync('CalcPrecoPrazoData', $this->buildRequest())->then(function ($response) { |
|
| 27 | + $promise = $client->callAsync('CalcPrecoPrazoData', $this->buildRequest())->then(function($response) { |
|
| 28 | 28 | $this->parseResult($response); |
| 29 | 29 | }); |
| 30 | 30 | $promise->wait(); |
@@ -148,8 +148,8 @@ |
||
| 148 | 148 | $xpath = new \DOMXpath($doc); |
| 149 | 149 | if ($xpath->query('//*[@id="form:j_idt123_input"]/option[2]')->item(0)) { |
| 150 | 150 | $this->payer = $xpath->query('//*[@id="form:j_idt123_input"]/option[2]') |
| 151 | - ->item(0) |
|
| 152 | - ->getAttribute('value'); |
|
| 151 | + ->item(0) |
|
| 152 | + ->getAttribute('value'); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $this->setOriginAirport(); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | 'https://mycargomanager.appslatam.com/eBusiness-web-1.0-view/private/CreateQuotation.jsf', |
| 136 | 136 | [ |
| 137 | 137 | 'headers' => $this->mainHeader |
| 138 | - ])->then(function ($response) { |
|
| 138 | + ])->then(function($response) { |
|
| 139 | 139 | if (!$this->payer && strstr($response->getBody(), 'Erro ao carregar o formulário')) { |
| 140 | 140 | $this->result->status = 'ERROR'; |
| 141 | 141 | $this->result->errors[] = 'Erro ao obter dados'; |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | [ |
| 199 | 199 | 'form_params' => $parameters, |
| 200 | 200 | 'headers' => $this->mainHeader |
| 201 | - ])->then(function ($response) { |
|
| 201 | + ])->then(function($response) { |
|
| 202 | 202 | $this->originAirport = $this->stringBetween($response->getBody(), 'data-item-value="', '"'); |
| 203 | 203 | }); |
| 204 | 204 | $promise->wait(); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | [ |
| 254 | 254 | 'form_params' => $parameters, |
| 255 | 255 | 'headers' => $this->mainHeader |
| 256 | - ])->then(function ($response) { |
|
| 256 | + ])->then(function($response) { |
|
| 257 | 257 | $this->destinyAirport = $this->stringBetween($response->getBody(), 'data-item-value="', '"'); |
| 258 | 258 | }); |
| 259 | 259 | $promise->wait(); |