Completed
Push — master ( 543705...d6a9b5 )
by Esteban De La Fuente
02:42 queued 47s
created
lib/Estado.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,12 +174,14 @@
 block discarded – undo
174 174
     public static function get($codigo, $args = null)
175 175
     {
176 176
         // si no hay glosa asociada al código se entrega el mismo código
177
-        if (!isset(self::$glosas[(int)$codigo]))
178
-            return (int)$codigo;
177
+        if (!isset(self::$glosas[(int)$codigo])) {
178
+                    return (int)$codigo;
179
+        }
179 180
         // si los argumentos no son un arreglo se obtiene arreglo a partir
180 181
         // de los argumentos pasados a la función
181
-        if (!is_array($args))
182
-            $args = array_slice(func_get_args(), 1);
182
+        if (!is_array($args)) {
183
+                    $args = array_slice(func_get_args(), 1);
184
+        }
183 185
         // entregar glosa
184 186
         return vsprintf(I18n::translate(self::$glosas[(int)$codigo], 'estados'), $args);
185 187
     }
Please login to merge, or discard this patch.
lib/Sii/Factoring/DteCedido.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 
69 69
     /**
70 70
      * Método que realiza la firma del DTE cedido
71
-     * @param Firma objeto que representa la Firma Electrónca
71
+     * @param Firma \sasco\LibreDTE\FirmaElectronica que representa la Firma Electrónca
72 72
      * @return =true si el DTE pudo ser fimado o =false si no se pudo firmar
73 73
      * @author Esteban De La Fuente Rubio, DeLaF (esteban[at]sasco.cl)
74 74
      * @version 2016-12-10
Please login to merge, or discard this patch.
examples/016-etapa_intercambio_EnvioRecibos.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,4 +66,4 @@
 block discarded – undo
66 66
 
67 67
 // si hubo errores mostrar
68 68
 foreach (\sasco\LibreDTE\Log::readAll() as $error)
69
-    echo $error,"\n";
69
+    echo $error, "\n";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,5 +98,6 @@
 block discarded – undo
98 98
 }
99 99
 
100 100
 // si hubo errores mostrar
101
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
101
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
102 102
     echo $error,"\n";
103
+}
Please login to merge, or discard this patch.
examples/027-ventas_sin_movimiento.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,4 +66,4 @@
 block discarded – undo
66 66
 
67 67
 // si hubo errores mostrar
68 68
 foreach (\sasco\LibreDTE\Log::readAll() as $error)
69
-    echo $error,"\n";
69
+    echo $error, "\n";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,5 +65,6 @@
 block discarded – undo
65 65
 var_dump($track_id);
66 66
 
67 67
 // si hubo errores mostrar
68
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
68
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
69 69
     echo $error,"\n";
70
+}
Please login to merge, or discard this patch.
examples/030-boleta_consumo_folio.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,4 +66,4 @@
 block discarded – undo
66 66
 
67 67
 // si hubo errores mostrar
68 68
 foreach (\sasco\LibreDTE\Log::readAll() as $error)
69
-    echo $error,"\n";
69
+    echo $error, "\n";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,5 +98,6 @@
 block discarded – undo
98 98
 }
99 99
 
100 100
 // si hubo errores mostrar
101
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
101
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
102 102
     echo $error,"\n";
103
+}
Please login to merge, or discard this patch.
examples/034-xml_entities.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,5 +83,6 @@
 block discarded – undo
83 83
 echo $XML2->getFlattened('/nodo1/nodo2')."\n\n";
84 84
 
85 85
 // si hubo errores mostrar
86
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
86
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
87 87
     echo $error, "\n";
88
+}
Please login to merge, or discard this patch.
examples/011-set_pruebas_factura_exenta.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,4 +66,4 @@
 block discarded – undo
66 66
 
67 67
 // si hubo errores mostrar
68 68
 foreach (\sasco\LibreDTE\Log::readAll() as $error)
69
-    echo $error,"\n";
69
+    echo $error, "\n";
Please login to merge, or discard this patch.
Braces   +10 added lines, -6 removed lines patch added patch discarded remove patch
@@ -411,17 +411,20 @@  discard block
 block discarded – undo
411 411
 // Objetos de Firma, Folios y EnvioDTE
412 412
 $Firma = new \sasco\LibreDTE\FirmaElectronica($config['firma']);
413 413
 $Folios = [];
414
-foreach ($folios as $tipo => $cantidad)
414
+foreach ($folios as $tipo => $cantidad) {
415 415
     $Folios[$tipo] = new \sasco\LibreDTE\Sii\Folios(file_get_contents('xml/folios/'.$tipo.'.xml'));
416
+}
416 417
 $EnvioDTE = new \sasco\LibreDTE\Sii\EnvioDte();
417 418
 
418 419
 // generar cada DTE, timbrar, firmar y agregar al sobre de EnvioDTE
419 420
 foreach ($set_pruebas as $documento) {
420 421
     $DTE = new \sasco\LibreDTE\Sii\Dte($documento);
421
-    if (!$DTE->timbrar($Folios[$DTE->getTipo()]))
422
-        break;
423
-    if (!$DTE->firmar($Firma))
424
-        break;
422
+    if (!$DTE->timbrar($Folios[$DTE->getTipo()])) {
423
+            break;
424
+    }
425
+    if (!$DTE->firmar($Firma)) {
426
+            break;
427
+    }
425 428
     $EnvioDTE->agregar($DTE);
426 429
 }
427 430
 
@@ -433,5 +436,6 @@  discard block
 block discarded – undo
433 436
 var_dump($track_id);
434 437
 
435 438
 // si hubo errores mostrar
436
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
439
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
437 440
     echo $error,"\n";
441
+}
Please login to merge, or discard this patch.
examples/015-etapa_intercambio_RecepcionDTE.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,4 +66,4 @@
 block discarded – undo
66 66
 
67 67
 // si hubo errores mostrar
68 68
 foreach (\sasco\LibreDTE\Log::readAll() as $error)
69
-    echo $error,"\n";
69
+    echo $error, "\n";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,5 +98,6 @@
 block discarded – undo
98 98
 }
99 99
 
100 100
 // si hubo errores mostrar
101
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
101
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
102 102
     echo $error,"\n";
103
+}
Please login to merge, or discard this patch.
examples/017-etapa_intercambio_ResultadoDTE.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,4 +66,4 @@
 block discarded – undo
66 66
 
67 67
 // si hubo errores mostrar
68 68
 foreach (\sasco\LibreDTE\Log::readAll() as $error)
69
-    echo $error,"\n";
69
+    echo $error, "\n";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,5 +98,6 @@
 block discarded – undo
98 98
 }
99 99
 
100 100
 // si hubo errores mostrar
101
-foreach (\sasco\LibreDTE\Log::readAll() as $error)
101
+foreach (\sasco\LibreDTE\Log::readAll() as $error) {
102 102
     echo $error,"\n";
103
+}
Please login to merge, or discard this patch.