@@ -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) !== '/') { |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | //& isolated, less than, greater than, quotation marks and apostrophes |
| 84 | 84 | //should be replaced by their html equivalent |
| 85 | 85 | $input = str_replace( |
| 86 | - ['&','<','>','"',"'"], |
|
| 87 | - ['&','<','>','"','''], |
|
| 86 | + ['&', '<', '>', '"', "'"], |
|
| 87 | + ['&', '<', '>', '"', '''], |
|
| 88 | 88 | $input |
| 89 | 89 | ); |
| 90 | 90 | $input = self::normalize($input); |
@@ -111,10 +111,10 @@ discard block |
||
| 111 | 111 | public static function squashCharacters($input) |
| 112 | 112 | { |
| 113 | 113 | $input = trim($input); |
| 114 | - $aFind = ['á','à','ã','â','é','ê','í','ó','ô','õ','ö','ú','ü', |
|
| 115 | - 'ç','Á','À','Ã','Â','É','Ê','Í','Ó','Ô','Õ','Ö','Ú','Ü','Ç']; |
|
| 116 | - $aSubs = ['a','a','a','a','e','e','i','o','o','o','o','u','u', |
|
| 117 | - 'c','A','A','A','A','E','E','I','O','O','O','O','U','U','C']; |
|
| 114 | + $aFind = ['á', 'à', 'ã', 'â', 'é', 'ê', 'í', 'ó', 'ô', 'õ', 'ö', 'ú', 'ü', |
|
| 115 | + 'ç', 'Á', 'À', 'Ã', 'Â', 'É', 'Ê', 'Í', 'Ó', 'Ô', 'Õ', 'Ö', 'Ú', 'Ü', 'Ç']; |
|
| 116 | + $aSubs = ['a', 'a', 'a', 'a', 'e', 'e', 'i', 'o', 'o', 'o', 'o', 'u', 'u', |
|
| 117 | + 'c', 'A', 'A', 'A', 'A', 'E', 'E', 'I', 'O', 'O', 'O', 'O', 'U', 'U', 'C']; |
|
| 118 | 118 | return str_replace($aFind, $aSubs, $input); |
| 119 | 119 | } |
| 120 | 120 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | public static function normalize($input) |
| 129 | 129 | { |
| 130 | 130 | //Carriage Return, Tab and Line Feed is not acceptable in strings |
| 131 | - $input = str_replace(["\r","\t","\n"], "", $input); |
|
| 131 | + $input = str_replace(["\r", "\t", "\n"], "", $input); |
|
| 132 | 132 | //Multiple spaces is not acceptable in strings |
| 133 | 133 | $input = preg_replace('/(?:\s\s+)/', ' ', $input); |
| 134 | 134 | //Only UTF-8 characters is acceptable |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | public static function clearProtocoledXML($string) |
| 211 | 211 | { |
| 212 | 212 | $procXML = self::clearXmlString($string); |
| 213 | - $aApp = array('nfe','cte','mdfe'); |
|
| 213 | + $aApp = array('nfe', 'cte', 'mdfe'); |
|
| 214 | 214 | foreach ($aApp as $app) { |
| 215 | 215 | $procXML = str_replace( |
| 216 | 216 | 'xmlns="http://www.portalfiscal.inf.br/' . $app . '" xmlns="http://www.w3.org/2000/09/xmldsig#"', |
@@ -229,11 +229,11 @@ discard block |
||
| 229 | 229 | public static function removeSomeAlienCharsfromTxt($txt) |
| 230 | 230 | { |
| 231 | 231 | //remove CRs and TABs |
| 232 | - $txt = str_replace(["\r","\t"], "", $txt); |
|
| 232 | + $txt = str_replace(["\r", "\t"], "", $txt); |
|
| 233 | 233 | //remove multiple spaces |
| 234 | 234 | $txt = preg_replace('/(?:\s\s+)/', ' ', $txt); |
| 235 | 235 | //remove spaces at begin and end of fields |
| 236 | - $txt = str_replace(["| "," |"], "|", $txt); |
|
| 236 | + $txt = str_replace(["| ", " |"], "|", $txt); |
|
| 237 | 237 | return $txt; |
| 238 | 238 | } |
| 239 | 239 | |
@@ -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); |