@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function __doRequest($request, $location, $action, $version, $oneWay = 0) |
| 32 | 32 | { |
| 33 | - $search = [":ns1","ns1:","\n","\r"]; |
|
| 33 | + $search = [":ns1", "ns1:", "\n", "\r"]; |
|
| 34 | 34 | return parent::__doRequest( |
| 35 | 35 | str_replace($search, '', $request), |
| 36 | 36 | $location, |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public function __toString() |
| 89 | 89 | { |
| 90 | - $messages = array_map(function (\Exception $exception) { |
|
| 90 | + $messages = array_map(function(\Exception $exception) { |
|
| 91 | 91 | return $exception->getMessage(); |
| 92 | 92 | }, $this->exceptions); |
| 93 | 93 | return implode(PHP_EOL, $messages); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $dom->formatOutput = false; |
| 40 | 40 | $dom->loadXML($xml, LIBXML_NOBLANKS | LIBXML_NOEMPTYTAG); |
| 41 | 41 | libxml_clear_errors(); |
| 42 | - if (! $dom->schemaValidate($xsd)) { |
|
| 42 | + if (!$dom->schemaValidate($xsd)) { |
|
| 43 | 43 | $errors = []; |
| 44 | 44 | foreach (libxml_get_errors() as $error) { |
| 45 | 45 | $errors[] = $error->message; |
@@ -194,8 +194,8 @@ |
||
| 194 | 194 | $mdec = strpos($n[1], '-'); |
| 195 | 195 | $p = explode('.', $value); |
| 196 | 196 | |
| 197 | - $ndec = !empty($p[1]) ? strlen($p[1]) : 0;//decimal digits |
|
| 198 | - $nint = strlen($p[0]);//integer digits |
|
| 197 | + $ndec = !empty($p[1]) ? strlen($p[1]) : 0; //decimal digits |
|
| 198 | + $nint = strlen($p[0]); //integer digits |
|
| 199 | 199 | if ($nint > $n[0]) { |
| 200 | 200 | throw new \InvalidArgumentException("O numero é maior que o permitido [$format]."); |
| 201 | 201 | } |
@@ -20,13 +20,13 @@ |
||
| 20 | 20 | public static function digestComparisonFailed() |
| 21 | 21 | { |
| 22 | 22 | return new static('O conteúdo do XML não corresponde ao Digest Value. ' |
| 23 | - . 'Provavelmente foi alterado após ter sido assinado'); |
|
| 23 | + . 'Provavelmente foi alterado após ter sido assinado'); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public static function signatureComparisonFailed() |
| 27 | 27 | { |
| 28 | 28 | return new static('A assinatura do XML não combina. ' |
| 29 | - . 'O conteúdo provavelmente foi alterado após ter sido assinado.'); |
|
| 29 | + . 'O conteúdo provavelmente foi alterado após ter sido assinado.'); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
@@ -269,7 +269,7 @@ |
||
| 269 | 269 | . $this->uid() |
| 270 | 270 | . '/' |
| 271 | 271 | . $mapto |
| 272 | - . '/' ; |
|
| 272 | + . '/'; |
|
| 273 | 273 | $folderRealPath = sys_get_temp_dir() . $path; |
| 274 | 274 | } |
| 275 | 275 | if (substr($folderRealPath, -1) !== '/') { |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | class Signer |
| 34 | 34 | { |
| 35 | - const CANONICAL = [true,false,null,null]; |
|
| 35 | + const CANONICAL = [true, false, null, null]; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * Make Signature tag |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | if ($num == 0) { |
| 164 | 164 | $bun = 40 * $partes[$num]; |
| 165 | 165 | } elseif ($num == 1) { |
| 166 | - $bun += $partes[$num]; |
|
| 166 | + $bun += $partes[$num]; |
|
| 167 | 167 | $abBinary[] = $bun; |
| 168 | 168 | } else { |
| 169 | 169 | $abBinary = self::xBase128($abBinary, (int) $partes[$num], true); |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | $node = $this->getElementsByTagName($nodeName)->item(0); |
| 145 | 145 | if (!empty($node)) { |
| 146 | 146 | $chaveId = $node->getAttribute("Id"); |
| 147 | - $chave = preg_replace('/[^0-9]/', '', $chaveId); |
|
| 147 | + $chave = preg_replace('/[^0-9]/', '', $chaveId); |
|
| 148 | 148 | return $chave; |
| 149 | 149 | } |
| 150 | 150 | return ''; |