@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | //get length of OID data |
| 75 | 75 | $len = self::getLength($data); |
| 76 | 76 | //get only a string with bytes belongs to OID |
| 77 | - $oidData = substr($data, 2 + $bytes, $len-($bytes)); |
|
| 77 | + $oidData = substr($data, 2 + $bytes, $len - ($bytes)); |
|
| 78 | 78 | //parse OID data many possibel formats and structures |
| 79 | 79 | $head = strlen($oidData) - strlen($xcv) - 2; |
| 80 | 80 | $ret = substr($oidData, -$head); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | if ($num == 0) { |
| 119 | 119 | $bun = 40 * $partes[$num]; |
| 120 | 120 | } elseif ($num == 1) { |
| 121 | - $bun += $partes[$num]; |
|
| 121 | + $bun += $partes[$num]; |
|
| 122 | 122 | $abBinary[] = $bun; |
| 123 | 123 | } else { |
| 124 | 124 | $abBinary = self::xBase128($abBinary, (integer) $partes[$num], true); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | { |
| 143 | 143 | $abc = $abIn; |
| 144 | 144 | if ($qIn > 127) { |
| 145 | - $abc = self::xBase128($abc, floor($qIn/128), false); |
|
| 145 | + $abc = self::xBase128($abc, floor($qIn / 128), false); |
|
| 146 | 146 | } |
| 147 | 147 | $qIn2 = $qIn % 128; |
| 148 | 148 | if ($flag) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | private function isCertificateExpired(Certificate $certificate = null) |
| 171 | 171 | { |
| 172 | - if (! $this->disableCertValidation) { |
|
| 172 | + if (!$this->disableCertValidation) { |
|
| 173 | 173 | if (null !== $certificate && $certificate->isExpired()) { |
| 174 | 174 | throw new Certificate\Exception\Expired($certificate); |
| 175 | 175 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | $bodyContent = '' |
| 392 | 392 | ) { |
| 393 | 393 | return sprintf( |
| 394 | - '<%s:Envelope %s >'.$header.'<%s:Body>%s</%s:Body></%s:Envelop>', |
|
| 394 | + '<%s:Envelope %s >' . $header . '<%s:Body>%s</%s:Body></%s:Envelop>', |
|
| 395 | 395 | $envelopPrefix, |
| 396 | 396 | $envelopAttributes, |
| 397 | 397 | $envelopPrefix, |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | } |
| 415 | 415 | $headerItems = ''; |
| 416 | 416 | foreach ($header->data as $key => $value) { |
| 417 | - $headerItems = '<'.$key.'>'.$value.'<'.$key.'>'; |
|
| 417 | + $headerItems = '<' . $key . '>' . $value . '<' . $key . '>'; |
|
| 418 | 418 | } |
| 419 | 419 | return sprintf( |
| 420 | 420 | '<%s:Header><%s xmlns="%s">%s</%s></%s:Header>', |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | { |
| 437 | 437 | $envelopeAttributes = ''; |
| 438 | 438 | foreach ($namespaces as $key => $value) { |
| 439 | - $envelopeAttributes = $key.'="'.$value.'"'; |
|
| 439 | + $envelopeAttributes = $key . '="' . $value . '"'; |
|
| 440 | 440 | } |
| 441 | 441 | return $envelopeAttributes; |
| 442 | 442 | } |
@@ -454,9 +454,9 @@ discard block |
||
| 454 | 454 | ); |
| 455 | 455 | } |
| 456 | 456 | $this->certsdir = $this->certificate->getCnpj() . '/certs/'; |
| 457 | - $this->prifile = $this->certsdir. Strings::randomString(10).'.pem'; |
|
| 458 | - $this->pubfile = $this->certsdir . Strings::randomString(10).'.pem'; |
|
| 459 | - $this->certfile = $this->certsdir . Strings::randomString(10).'.pem'; |
|
| 457 | + $this->prifile = $this->certsdir . Strings::randomString(10) . '.pem'; |
|
| 458 | + $this->pubfile = $this->certsdir . Strings::randomString(10) . '.pem'; |
|
| 459 | + $this->certfile = $this->certsdir . Strings::randomString(10) . '.pem'; |
|
| 460 | 460 | $ret = true; |
| 461 | 461 | $private = $this->certificate->privateKey; |
| 462 | 462 | if ($this->encriptPrivateKey) { |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | ); |
| 482 | 482 | $ret &= $this->filesystem->put( |
| 483 | 483 | $this->certfile, |
| 484 | - $private."{$this->certificate}" |
|
| 484 | + $private . "{$this->certificate}" |
|
| 485 | 485 | ); |
| 486 | 486 | if (!$ret) { |
| 487 | 487 | throw new RuntimeException( |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | //utilize a API. Outra solução para remover arquivos "perdidos" pode ser |
| 509 | 509 | //encontrada oportunamente. |
| 510 | 510 | $dt = new \DateTime(); |
| 511 | - $tint = new \DateInterval("PT".$this->waitingTime."M"); |
|
| 511 | + $tint = new \DateInterval("PT" . $this->waitingTime . "M"); |
|
| 512 | 512 | $tint->invert = 1; |
| 513 | 513 | $tsLimit = $dt->add($tint)->getTimestamp(); |
| 514 | 514 | foreach ($contents as $item) { |