Passed
Push — master ( 8ad44c...3b9b2e )
by Joe Nilson
03:25
created
Translation/updater.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 $files = [];
9 9
 $langs = 'ca_ES,cs_CZ,de_DE,en_EN,es_AR,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_MX,es_PA,es_PE,es_UY,eu_ES,fr_FR,gl_ES,it_IT,pl_PL,pt_BR,pt_PT,va_ES';
10 10
 foreach (explode(',', $langs) as $lang) {
11
-    $files[] = $lang . '.json';
11
+    $files[] = $lang.'.json';
12 12
 }
13 13
 foreach (scandir(__DIR__, SCANDIR_SORT_ASCENDING) as $filename) {
14 14
     if (is_file($filename) && substr($filename, -5) === '.json' && false === in_array($filename, $files)) {
@@ -18,25 +18,25 @@  discard block
 block discarded – undo
18 18
 
19 19
 // download json from facturascripts.com
20 20
 foreach ($files as $filename) {
21
-    $url = "https://facturascripts.com/EditLanguage?action=json&idproject=176&code=" . substr($filename, 0, -5);
21
+    $url = "https://facturascripts.com/EditLanguage?action=json&idproject=176&code=".substr($filename, 0, -5);
22 22
     $newContent = file_get_contents($url);
23 23
     if (empty($newContent)) {
24 24
         if (file_exists($filename)) {
25 25
             unlink($filename);
26
-            echo "Remove " . $filename . "\n";
26
+            echo "Remove ".$filename."\n";
27 27
             continue;
28 28
         }
29 29
 
30
-        echo "Empty " . $filename . "\n";
30
+        echo "Empty ".$filename."\n";
31 31
         continue;
32 32
     }
33 33
 
34 34
     $oldContent = file_exists($filename) ? file_get_contents($filename) : '';
35 35
     if (strlen($newContent) > 10 && $newContent !== $oldContent) {
36
-        echo "Download " . $filename . "\n";
36
+        echo "Download ".$filename."\n";
37 37
         file_put_contents($filename, $newContent);
38 38
         continue;
39 39
     }
40 40
 
41
-    echo "Skip " . $filename . "\n";
41
+    echo "Skip ".$filename."\n";
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
Init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         $this->loadExtension(new Extension\Controller\EditProducto());
65 65
         $this->loadExtension(new Extension\Controller\EditSettings());
66 66
 
67
-        AssetManager::add('js', \FS_ROUTE . '/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
67
+        AssetManager::add('js', \FS_ROUTE.'/Plugins/fsRepublicaDominicana/Assets/JS/CommonDomFunctions.js');
68 68
         SalesLineHTML::addMod(new Mod\SalesLineMod());
69 69
         SalesFooterHTML::addMod(new Mod\SalesFooterMod());
70 70
         PurchasesFooterHTML::addMod(new Mod\PurchasesFooterMod());
Please login to merge, or discard this patch.
Lib/Tickets/RepDominicana.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $ticket = new Ticket();
35 35
         $ticket->idprinter = $printer->id;
36 36
         $ticket->nick = $user->nick;
37
-        $ticket->title = self::$i18n->trans($model->modelClassName() . '-min') . ' RepDominicana.php' . $model->codigo;
37
+        $ticket->title = self::$i18n->trans($model->modelClassName().'-min').' RepDominicana.php'.$model->codigo;
38 38
 
39 39
         static::setHeader($model, $printer, $ticket->title);
40 40
         static::setBody($model, $printer);
@@ -67,36 +67,36 @@  discard block
 block discarded – undo
67 67
 
68 68
         // imprimimos el nombre corto de la empresa
69 69
         if ($printer->print_comp_shortname) {
70
-            static::$escpos->text(static::sanitize($company->nombrecorto) . "\n");
70
+            static::$escpos->text(static::sanitize($company->nombrecorto)."\n");
71 71
             static::$escpos->setTextSize($printer->head_font_size, $printer->head_font_size);
72 72
 
73 73
             // imprimimos el nombre de la empresa
74
-            static::$escpos->text(static::sanitize($company->nombre) . "\n");
74
+            static::$escpos->text(static::sanitize($company->nombre)."\n");
75 75
         } else {
76 76
             // imprimimos el nombre de la empresa
77
-            static::$escpos->text(static::sanitize($company->nombre) . "\n");
77
+            static::$escpos->text(static::sanitize($company->nombre)."\n");
78 78
             static::$escpos->setTextSize($printer->head_font_size, $printer->head_font_size);
79 79
         }
80 80
 
81 81
         static::$escpos->setJustification();
82 82
 
83 83
         // imprimimos la dirección de la empresa
84
-        static::$escpos->text(static::sanitize($company->direccion) . "\n");
85
-        static::$escpos->text(static::sanitize("CP: " . $company->codpostal . ', ' . $company->ciudad) . "\n");
86
-        static::$escpos->text(static::sanitize($company->tipoidfiscal . ': ' . $company->cifnif) . "\n\n");
84
+        static::$escpos->text(static::sanitize($company->direccion)."\n");
85
+        static::$escpos->text(static::sanitize("CP: ".$company->codpostal.', '.$company->ciudad)."\n");
86
+        static::$escpos->text(static::sanitize($company->tipoidfiscal.': '.$company->cifnif)."\n\n");
87 87
 
88 88
         if ($printer->print_comp_tlf) {
89 89
             if (false === empty($company->telefono1) && false === empty($company->telefono2)) {
90
-                static::$escpos->text(static::sanitize($company->telefono1 . ' / ' . $company->telefono2) . "\n");
90
+                static::$escpos->text(static::sanitize($company->telefono1.' / '.$company->telefono2)."\n");
91 91
             } elseif (false === empty($company->telefono1)) {
92
-                static::$escpos->text(static::sanitize($company->telefono1) . "\n");
92
+                static::$escpos->text(static::sanitize($company->telefono1)."\n");
93 93
             } elseif (false === empty($company->telefono2)) {
94
-                static::$escpos->text(static::sanitize($company->telefono2) . "\n");
94
+                static::$escpos->text(static::sanitize($company->telefono2)."\n");
95 95
             }
96 96
         }
97 97
 
98 98
         // imprimimos el título del documento
99
-        static::$escpos->text(static::sanitize($title) . "\n");
99
+        static::$escpos->text(static::sanitize($title)."\n");
100 100
 
101 101
         static::setHeaderTPV($model, $printer);
102 102
 
@@ -114,28 +114,28 @@  discard block
 block discarded – undo
114 114
             )
115 115
         ) {
116 116
             static::$escpos->text(static::sanitize(
117
-                static::$i18n->trans('date') . ': ' . $model->fecha . ' ' . $model->hora
118
-                ) . "\n");
117
+                static::$i18n->trans('date').': '.$model->fecha.' '.$model->hora
118
+                )."\n");
119 119
             static::$escpos->text(static::sanitize(
120
-                static::$i18n->trans('customer') . ': ' . $model->nombrecliente
121
-                ) . "\n\n");
120
+                static::$i18n->trans('customer').': '.$model->nombrecliente
121
+                )."\n\n");
122 122
 
123 123
             if ($model->modelClassName() === 'FacturaCliente') {
124 124
                 if (property_exists($model, 'numeroncf') && $model->numeroncf) {
125 125
                     static::$escpos->text(static::sanitize(
126
-                        static::$i18n->trans('ncf-number') . ': ' . $model->numeroncf
127
-                    )) . "\n";
126
+                        static::$i18n->trans('ncf-number').': '.$model->numeroncf
127
+                    ))."\n";
128 128
                 }
129 129
                 if (property_exists($model, 'tipocomprobante') && $model->tipocomprobante) {
130 130
                     static::$escpos->text(static::sanitize(
131
-                        static::$i18n->trans('tipo_comprobante') . ': ' .
131
+                        static::$i18n->trans('tipo_comprobante').': '.
132 132
                         static::getTipoComprobanteRD($model->tipocomprobante)
133
-                    )) . "\n";
133
+                    ))."\n";
134 134
                 }
135 135
                 if (property_exists($model, 'ncffechavencimiento') && $model->ncffechavencimiento) {
136 136
                     static::$escpos->text(static::sanitize(
137
-                        static::$i18n->trans('due-date') . ': ' . $model->ncffechavencimiento
138
-                    )) . "\n";
137
+                        static::$i18n->trans('due-date').': '.$model->ncffechavencimiento
138
+                    ))."\n";
139 139
                 }
140 140
             }
141 141
         }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         // añadimos la cabecera
144 144
         if ($printer->head) {
145 145
             static::$escpos->setJustification(Printer::JUSTIFY_CENTER);
146
-            static::$escpos->text(static::sanitize($printer->head) . "\n\n");
146
+            static::$escpos->text(static::sanitize($printer->head)."\n\n");
147 147
             static::$escpos->setJustification();
148 148
         }
149 149
     }
Please login to merge, or discard this patch.
Extension/Model/FacturaCliente.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function saveBefore(): Closure
72 72
     {
73
-        return function () {
73
+        return function() {
74 74
             if (null !== $this->codigorect && $this->idfactura === null) {
75 75
                 $this->cleanRefundData();
76 76
             }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                     $tipocomprobante = $actualCliente->tipocomprobante;
90 90
                 }
91 91
 
92
-                if (true === in_array($this->numeroncf, ['',null])) {
92
+                if (true === in_array($this->numeroncf, ['', null])) {
93 93
                     $ncfrango = new NCFRango();
94 94
                     $ncfRangoToUse = $ncfrango->getByTipoComprobante($actualCliente->idempresa, $tipocomprobante);
95 95
                     if (!$ncfRangoToUse) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 }
106 106
 
107 107
                 //Verificamos si $this->tipoComprobante es una nota de crédito o debito
108
-                $arrayNCFTypes = ['03','04'];
108
+                $arrayNCFTypes = ['03', '04'];
109 109
                 if (in_array($this->tipocomprobante, $arrayNCFTypes) === true) {
110 110
                     $this->ncftipoanulacion = $_REQUEST['ncftipoanulacionr'] ?? $this->ncftipoanulacion;
111 111
                     $this->ncffechavencimiento = $_REQUEST['ncffechavencimientor'] ?? $this->ncffechavencimiento;
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
 
119 119
     public function all(): Closure
120 120
     {
121
-        return function () {
121
+        return function() {
122 122
             $this->facturarectnumero2 = '';
123 123
             if ($this->idfacturarect !== '') {
124 124
                 $facturaRectificativa = $this->get($this->idfacturarect);
125
-                $this->loadFromData(['facturarectnumero2' => 'SI' ]);
125
+                $this->loadFromData(['facturarectnumero2' => 'SI']);
126 126
                 $this->facturarectnumero2 = $facturaRectificativa->numero2;
127 127
             } else {
128 128
                 $this->loadFromData(['facturarectnumero2' => 'NO HAY']);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
     public function descripcionTipoComprobante(): Closure
135 135
     {
136
-        return function () {
136
+        return function() {
137 137
             $ncftipocomprobante = new NCFTipo();
138 138
             $ncftipocomprobante->loadFromCode($this->tipocomprobante);
139 139
             return $ncftipocomprobante->descripcion;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     }
142 142
     protected function cleanRefundData()
143 143
     {
144
-        return function () {
144
+        return function() {
145 145
             $this->numeroncf = '';
146 146
             $this->tipocomprobante = null;
147 147
             $this->ncffechavencimiento = null;
Please login to merge, or discard this patch.