Skip to content

Commit

Permalink
Merge pull request #41 from brunobacha/master
Browse files Browse the repository at this point in the history
php 7.4
  • Loading branch information
cagartner authored Jun 29, 2020
2 parents 9f61b92 + 57ff20a commit 73ef026
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
],
"require": {
"php": ">=5.3.0",
"cagartner/phpquery": "0.9.8"
"php": ">=7.3.0",
"cagartner/phpquery": "0.9.11"
},
"autoload": {
"psr-0": {
Expand Down
4 changes: 2 additions & 2 deletions src/Cagartner/CorreiosConsulta/CorreiosConsulta.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function frete($dados, $options = array())
'valor_declarado' => self::cleanMoney($rate->ValorValorDeclarado),
'entrega_domiciliar' => $rate->EntregaDomiciliar === 'S',
'entrega_sabado' => $rate->EntregaSabado === 'S',
'erro' => array('codigo' => (real) $rate->Erro, 'mensagem' => (real) $rate->MsgErro),
'erro' => array('codigo' => (float) $rate->Erro, 'mensagem' => $rate->MsgErro),
);
}

Expand Down Expand Up @@ -222,7 +222,7 @@ public function rastrear($codigo)
list($data, $hora, $local) = explode("<br>", phpQuery::pq($tr)->find('td:eq(0)')->html());
list($status, $encaminhado) = explode("<br>", phpQuery::pq($tr)->find('td:eq(1)')->html());

$rastreamento[] = array('data' => trim($data) . " " . trim($hora), 'local' => trim($local), 'status' => trim(strip_tags($status)));
$rastreamento[] = array('data' => strip_tags(trim($data)) . " " . strip_tags(trim($hora)), 'local' => strip_tags(trim($local)), 'status' => strip_tags(trim($status)));

if (trim($encaminhado)) {
$rastreamento[count($rastreamento) - 1]['encaminhado'] = trim($encaminhado);
Expand Down

0 comments on commit 73ef026

Please sign in to comment.