Completed
Pull Request — master (#189)
by
unknown
03:42
created
src/Signer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $nsSignatureMethod = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256';
119 119
             $nsDigestMethod = 'http://www.w3.org/2001/04/xmlenc#sha256';
120 120
         }
121
-        $nsTransformMethod1 ='http://www.w3.org/2000/09/xmldsig#enveloped-signature';
121
+        $nsTransformMethod1 = 'http://www.w3.org/2000/09/xmldsig#enveloped-signature';
122 122
         $nsTransformMethod2 = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315';
123 123
         $idSigned = trim($node->getAttribute($mark));
124 124
         $digestValue = self::makeDigest($node, $digestAlgorithm, $canonical);
Please login to merge, or discard this patch.
src/Soap/SoapBase.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@
 block discarded – undo
248 248
     
249 249
     /**
250 250
      * Return uid from user
251
-     * @return string
251
+     * @return integer
252 252
      */
253 253
     protected function uid()
254 254
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
                 . $this->uid()
237 237
                 .'/'
238 238
                 . $this->certificate->getCnpj()
239
-                . '/' ;
240
-            $folderRealPath = sys_get_temp_dir().$path;
239
+                . '/';
240
+            $folderRealPath = sys_get_temp_dir() . $path;
241 241
         }
242 242
         if (substr($folderRealPath, -1) !== '/') {
243 243
             $folderRealPath .= '/';
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         if (!$this->filesystem->has($name)) {
527 527
             return $name;
528 528
         }
529
-        $this->randomName($n+5);
529
+        $this->randomName($n + 5);
530 530
     }
531 531
 
532 532
     /**
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
         //remove todos os arquivos antigos
546 546
         $contents = $this->filesystem->listContents($this->certsdir, true);
547 547
         $dt = new \DateTime();
548
-        $tint = new \DateInterval("PT".$this->waitingTime."M");
548
+        $tint = new \DateInterval("PT" . $this->waitingTime . "M");
549 549
         $tint->invert = 1;
550 550
         $tsLimit = $dt->add($tint)->getTimestamp();
551 551
         foreach ($contents as $item) {
Please login to merge, or discard this patch.
src/Strings.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
     public static function replaceSpecialsChars($string)
24 24
     {
25 25
         $string = trim($string);
26
-        $aFind = ['&','á','à','ã','â','é','ê','í','ó','ô','õ','ú','ü',
27
-            'ç','Á','À','Ã','Â','É','Ê','Í','Ó','Ô','Õ','Ú','Ü','Ç'];
28
-        $aSubs = ['e','a','a','a','a','e','e','i','o','o','o','u','u',
29
-            'c','A','A','A','A','E','E','I','O','O','O','U','U','C'];
26
+        $aFind = ['&', 'á', 'à', 'ã', 'â', 'é', 'ê', 'í', 'ó', 'ô', 'õ', 'ú', 'ü',
27
+            'ç', 'Á', 'À', 'Ã', 'Â', 'É', 'Ê', 'Í', 'Ó', 'Ô', 'Õ', 'Ú', 'Ü', 'Ç'];
28
+        $aSubs = ['e', 'a', 'a', 'a', 'a', 'e', 'e', 'i', 'o', 'o', 'o', 'u', 'u',
29
+            'c', 'A', 'A', 'A', 'A', 'E', 'E', 'I', 'O', 'O', 'O', 'U', 'U', 'C'];
30 30
         $newstr = str_replace($aFind, $aSubs, $string);
31 31
         $newstr = preg_replace("/[^a-zA-Z0-9 @,-_.;:()\/]/", "", $newstr);
32 32
         return $newstr;
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
     public static function clearProtocoledXML($string)
95 95
     {
96 96
         $procXML = self::clearXmlString($string);
97
-        $aApp = array('nfe','cte','mdfe');
97
+        $aApp = array('nfe', 'cte', 'mdfe');
98 98
         foreach ($aApp as $app) {
99 99
             $procXML = str_replace(
100
-                'xmlns="http://www.portalfiscal.inf.br/'.$app.'" xmlns="http://www.w3.org/2000/09/xmldsig#"',
101
-                'xmlns="http://www.portalfiscal.inf.br/'.$app.'"',
100
+                'xmlns="http://www.portalfiscal.inf.br/' . $app . '" xmlns="http://www.w3.org/2000/09/xmldsig#"',
101
+                'xmlns="http://www.portalfiscal.inf.br/' . $app . '"',
102 102
                 $procXML
103 103
             );
104 104
         }
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
     public static function removeSomeAlienCharsfromTxt($txt)
114 114
     {
115 115
         //remove CRs and TABs
116
-        $txt = str_replace(["\r","\t"], "", $txt);
116
+        $txt = str_replace(["\r", "\t"], "", $txt);
117 117
         //remove multiple spaces
118 118
         $txt = preg_replace('/(?:\s\s+)/', ' ', $txt);
119 119
         //remove spaces at begin and end of fields
120
-        $txt = str_replace(["| "," |"], "|", $txt);
120
+        $txt = str_replace(["| ", " |"], "|", $txt);
121 121
         return $txt;
122 122
     }
123 123
     
Please login to merge, or discard this patch.