Completed
Push — master ( 8d4f05...5a81b1 )
by Esteban De La Fuente
21s
created
lib/Sii/Folios.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
         // validar firma del SII sobre los folios
66 66
         $firma = $this->getFirma();
67 67
         $idk = $this->getIDK();
68
-        if ($firma === false || $idk === false) {
68
+        if ($firma===false || $idk===false) {
69 69
             return false;
70 70
         }
71 71
         $pub_key = \sasco\LibreDTE\Sii::cert($idk);
72
-        if ($pub_key === false || openssl_verify($this->xml->getFlattened('/AUTORIZACION/CAF/DA'), base64_decode($firma), $pub_key)!==1) {
72
+        if ($pub_key===false || openssl_verify($this->xml->getFlattened('/AUTORIZACION/CAF/DA'), base64_decode($firma), $pub_key)!==1) {
73 73
             \sasco\LibreDTE\Log::write(
74 74
                 \sasco\LibreDTE\Estado::FOLIOS_ERROR_FIRMA,
75 75
                 \sasco\LibreDTE\Estado::get(\sasco\LibreDTE\Estado::FOLIOS_ERROR_FIRMA)
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             );
101 101
             return false;
102 102
         }
103
-        return $plain === $plain_firmado;
103
+        return $plain===$plain_firmado;
104 104
     }
105 105
 
106 106
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         if (!$desde || !$hasta) {
177 177
             return false;
178 178
         }
179
-        return $hasta - $desde + 1;
179
+        return $hasta-$desde+1;
180 180
     }
181 181
 
182 182
     /**
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         if (!$fecha_autorizacion) {
286 286
             return false;
287 287
         }
288
-        return date('Y-m-d', strtotime($fecha_autorizacion. ' + 180 days')); // 6 meses = 6 * 30 días
288
+        return date('Y-m-d', strtotime($fecha_autorizacion.' + 180 days')); // 6 meses = 6 * 30 días
289 289
     }
290 290
 
291 291
     /**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         $d1 = new \DateTime($this->getFechaAutorizacion());
299 299
         $d2 = new \DateTime(date('Y-m-d'));
300 300
         $diff = $d1->diff($d2);
301
-        $meses = $diff->m + ($diff->y*12);
301
+        $meses = $diff->m+($diff->y * 12);
302 302
         if ($diff->d) {
303 303
             $meses += round($diff->d / 30, 2);
304 304
         }
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         if (!$this->vence()) {
317 317
             return true;
318 318
         }
319
-        return date('Y-m-d') < $this->getFechaVencimiento();
319
+        return date('Y-m-d')<$this->getFechaVencimiento();
320 320
     }
321 321
 
322 322
     /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     public function getCertificacion()
340 340
     {
341 341
         $idk = $this->getIDK();
342
-        return $idk ?  $idk === 100 : null;
342
+        return $idk ? $idk===100 : null;
343 343
     }
344 344
 
345 345
     /**
Please login to merge, or discard this patch.