Passed
Push — master ( 2938c8...c15d53 )
by Roberto
04:20 queued 02:25
created
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
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
                 . $this->uid()
270 270
                 .'/'
271 271
                 . $mapto
272
-                . '/' ;
273
-            $folderRealPath = sys_get_temp_dir().$path;
272
+                . '/';
273
+            $folderRealPath = sys_get_temp_dir() . $path;
274 274
         }
275 275
         if (substr($folderRealPath, -1) !== '/') {
276 276
             $folderRealPath .= '/';
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
         if (!$this->filesystem->has($name)) {
560 560
             return $name;
561 561
         }
562
-        $this->randomName($n+5);
562
+        $this->randomName($n + 5);
563 563
     }
564 564
 
565 565
     /**
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
         //remove todos os arquivos antigos
579 579
         $contents = $this->filesystem->listContents($this->certsdir, true);
580 580
         $dt = new \DateTime();
581
-        $tint = new \DateInterval("PT".$this->waitingTime."M");
581
+        $tint = new \DateInterval("PT" . $this->waitingTime . "M");
582 582
         $tint->invert = 1;
583 583
         $tsLimit = $dt->add($tint)->getTimestamp();
584 584
         foreach ($contents as $item) {
Please login to merge, or discard this patch.
src/Tags/Tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,8 +194,8 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Certificate/Exception/Expired.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
     public function __construct(Certificate $certificate)
11 11
     {
12 12
         $invalidDate = $certificate->getValidTo()->format('Y-m-d H:i:s');
13
-        parent::__construct('Certificate era válido até '.$invalidDate, 0, null);
13
+        parent::__construct('Certificate era válido até ' . $invalidDate, 0, null);
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/Strings.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
         //& isolated, less than, greater than, quotation marks and apostrophes
82 82
         //should be replaced by their html equivalent
83 83
         $input = str_replace(
84
-            ['& ','<','>','"',"'"],
85
-            ['&amp; ','&lt;','&gt;','&quot;','&#39;'],
84
+            ['& ', '<', '>', '"', "'"],
85
+            ['&amp; ', '&lt;', '&gt;', '&quot;', '&#39;'],
86 86
             $input
87 87
         );
88 88
         $input = self::normalize($input);
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
     public static function squashCharacters($input)
110 110
     {
111 111
         $input = trim($input);
112
-        $aFind = ['á','à','ã','â','é','ê','í','ó','ô','õ','ö','ú','ü',
113
-            'ç','Á','À','Ã','Â','É','Ê','Í','Ó','Ô','Õ','Ö','Ú','Ü','Ç'];
114
-        $aSubs = ['a','a','a','a','e','e','i','o','o','o','o','u','u',
115
-            'c','A','A','A','A','E','E','I','O','O','O','O','U','U','C'];
112
+        $aFind = ['á', 'à', 'ã', 'â', 'é', 'ê', 'í', 'ó', 'ô', 'õ', 'ö', 'ú', 'ü',
113
+            'ç', 'Á', 'À', 'Ã', 'Â', 'É', 'Ê', 'Í', 'Ó', 'Ô', 'Õ', 'Ö', 'Ú', 'Ü', 'Ç'];
114
+        $aSubs = ['a', 'a', 'a', 'a', 'e', 'e', 'i', 'o', 'o', 'o', 'o', 'u', 'u',
115
+            'c', 'A', 'A', 'A', 'A', 'E', 'E', 'I', 'O', 'O', 'O', 'O', 'U', 'U', 'C'];
116 116
         return str_replace($aFind, $aSubs, $input);
117 117
     }
118 118
     
@@ -126,21 +126,21 @@  discard block
 block discarded – undo
126 126
     public static function normalize($input)
127 127
     {
128 128
         //Carriage Return, Tab and Line Feed is not acceptable in strings
129
-        $input = str_replace(["\r","\t","\n"], "", $input);
129
+        $input = str_replace(["\r", "\t", "\n"], "", $input);
130 130
         //Multiple spaces is not acceptable in strings
131 131
         $input = preg_replace('/(?:\s\s+)/', ' ', $input);
132 132
         //Only UTF-8 characters is acceptable
133 133
         $input = Encoding::fixUTF8($input);
134 134
         $input = preg_replace(
135
-            '/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]'.
136
-            '|[\x00-\x7F][\x80-\xBF]+'.
137
-            '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*'.
138
-            '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})'.
135
+            '/[\x00-\x08\x10\x0B\x0C\x0E-\x19\x7F]' .
136
+            '|[\x00-\x7F][\x80-\xBF]+' .
137
+            '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*' .
138
+            '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})' .
139 139
             '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})/S',
140 140
             '',
141 141
             $input
142 142
         );
143
-        $input = preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]'.
143
+        $input = preg_replace('/\xE0[\x80-\x9F][\x80-\xBF]' .
144 144
             '|\xED[\xA0-\xBF][\x80-\xBF]/S', '', $input);
145 145
         //And no other control character is acceptable either
146 146
         return preg_replace('/[[:cntrl:]]/', '', $input);
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
     public static function clearProtocoledXML($string)
209 209
     {
210 210
         $procXML = self::clearXmlString($string);
211
-        $aApp = array('nfe','cte','mdfe');
211
+        $aApp = array('nfe', 'cte', 'mdfe');
212 212
         foreach ($aApp as $app) {
213 213
             $procXML = str_replace(
214
-                'xmlns="http://www.portalfiscal.inf.br/'.$app.'" xmlns="http://www.w3.org/2000/09/xmldsig#"',
215
-                'xmlns="http://www.portalfiscal.inf.br/'.$app.'"',
214
+                'xmlns="http://www.portalfiscal.inf.br/' . $app . '" xmlns="http://www.w3.org/2000/09/xmldsig#"',
215
+                'xmlns="http://www.portalfiscal.inf.br/' . $app . '"',
216 216
                 $procXML
217 217
             );
218 218
         }
@@ -227,11 +227,11 @@  discard block
 block discarded – undo
227 227
     public static function removeSomeAlienCharsfromTxt($txt)
228 228
     {
229 229
         //remove CRs and TABs
230
-        $txt = str_replace(["\r","\t"], "", $txt);
230
+        $txt = str_replace(["\r", "\t"], "", $txt);
231 231
         //remove multiple spaces
232 232
         $txt = preg_replace('/(?:\s\s+)/', ' ', $txt);
233 233
         //remove spaces at begin and end of fields
234
-        $txt = str_replace(["| "," |"], "|", $txt);
234
+        $txt = str_replace(["| ", " |"], "|", $txt);
235 235
         return $txt;
236 236
     }
237 237
     
Please login to merge, or discard this patch.