Completed
Push — master ( e7f432...9823d1 )
by Esteban De La Fuente
03:15
created
lib/Sii/Folios.php 1 patch
Spacing   +7 added lines, -7 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
     /**
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         if (!$fecha_autorizacion) {
270 270
             return false;
271 271
         }
272
-        return date('Y-m-d', strtotime($fecha_autorizacion. ' + 180 days')); // 6 meses = 6 * 30 días
272
+        return date('Y-m-d', strtotime($fecha_autorizacion.' + 180 days')); // 6 meses = 6 * 30 días
273 273
     }
274 274
 
275 275
     /**
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         $d1 = new \DateTime($this->getFechaAutorizacion());
283 283
         $d2 = new \DateTime(date('Y-m-d'));
284 284
         $diff = $d1->diff($d2);
285
-        $meses = $diff->m + ($diff->y*12);
285
+        $meses = $diff->m+($diff->y * 12);
286 286
         if ($diff->d) {
287 287
             $meses += round($diff->d / 30, 2);
288 288
         }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         if (!$this->vence()) {
301 301
             return true;
302 302
         }
303
-        return date('Y-m-d') < $this->getFechaVencimiento();
303
+        return date('Y-m-d')<$this->getFechaVencimiento();
304 304
     }
305 305
 
306 306
     /**
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     public function getCertificacion()
324 324
     {
325 325
         $idk = $this->getIDK();
326
-        return $idk ?  $idk === 100 : null;
326
+        return $idk ? $idk===100 : null;
327 327
     }
328 328
 
329 329
     /**
Please login to merge, or discard this patch.