Skip to content

Commit

Permalink
Merge pull request #154 from robmachado/master
Browse files Browse the repository at this point in the history
[UPD] SoapBase spaces adjust and inclusion PHP7.2
  • Loading branch information
robmachado committed Dec 21, 2017
2 parents 46aa781 + 8b0d275 commit f4050bf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -4,6 +4,7 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -26,7 +26,7 @@
}
],
"require": {
"php": "^5.6 || ^7.0",
"php": ">=5.6",
"ext-dom": "*",
"ext-curl": "*",
"ext-soap": "*",
Expand Down
14 changes: 7 additions & 7 deletions src/Soap/SoapBase.php
Expand Up @@ -399,7 +399,7 @@ private function mountEnvelopString(
$bodyContent = ''
) {
return sprintf(
'<%s:Envelope %s>'.$header.'<%s:Body>%s</%s:Body></%s:Envelope>',
'<%s:Envelope %s>' . $header . '<%s:Body>%s</%s:Body></%s:Envelope>',
$envelopPrefix,
$envelopAttributes,
$envelopPrefix,
Expand All @@ -422,7 +422,7 @@ private function mountSoapHeaders($envelopPrefix, $header = null)
}
$headerItems = '';
foreach ($header->data as $key => $value) {
$headerItems .= '<'.$key.'>'.$value.'</'.$key.'>';
$headerItems .= '<' . $key . '>' . $value . '</' . $key . '>';
}
return sprintf(
'<%s:Header><%s xmlns="%s">%s</%s></%s:Header>',
Expand All @@ -444,7 +444,7 @@ private function getStringAttributes($namespaces = [])
{
$envelopeAttributes = '';
foreach ($namespaces as $key => $value) {
$envelopeAttributes = $key.'="'.$value.'"';
$envelopeAttributes = $key . '="' . $value . '"';
}
return $envelopeAttributes;
}
Expand All @@ -462,9 +462,9 @@ public function saveTemporarilyKeyFiles()
);
}
$this->certsdir = $this->certificate->getCnpj() . '/certs/';
$this->prifile = $this->certsdir. Strings::randomString(10).'.pem';
$this->pubfile = $this->certsdir . Strings::randomString(10).'.pem';
$this->certfile = $this->certsdir . Strings::randomString(10).'.pem';
$this->prifile = $this->certsdir . Strings::randomString(10) . '.pem';
$this->pubfile = $this->certsdir . Strings::randomString(10) . '.pem';
$this->certfile = $this->certsdir . Strings::randomString(10) . '.pem';
$ret = true;
$private = $this->certificate->privateKey;
if ($this->encriptPrivateKey) {
Expand Down Expand Up @@ -516,7 +516,7 @@ public function removeTemporarilyFiles()
//utilize a API. Outra solução para remover arquivos "perdidos" pode ser
//encontrada oportunamente.
$dt = new \DateTime();
$tint = new \DateInterval("PT".$this->waitingTime."M");
$tint = new \DateInterval("PT" . $this->waitingTime . "M");
$tint->invert = 1;
$tsLimit = $dt->add($tint)->getTimestamp();
foreach ($contents as $item) {
Expand Down
4 changes: 2 additions & 2 deletions src/Soap/SoapCurl.php
Expand Up @@ -139,9 +139,9 @@ private function setCurlProxy(&$oCurl)
if ($this->proxyIP != '') {
curl_setopt($oCurl, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($oCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP.':'.$this->proxyPort);
curl_setopt($oCurl, CURLOPT_PROXY, $this->proxyIP . ':' . $this->proxyPort);
if ($this->proxyUser != '') {
curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser.':'.$this->proxyPass);
curl_setopt($oCurl, CURLOPT_PROXYUSERPWD, $this->proxyUser . ':' . $this->proxyPass);
curl_setopt($oCurl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
}
}
Expand Down

0 comments on commit f4050bf

Please sign in to comment.