@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $token = \sasco\LibreDTE\Sii\Autenticacion::getToken($config['firma']); |
44 | 44 | if (!$token) { |
45 | 45 | foreach (\sasco\LibreDTE\Log::readAll() as $error) |
46 | - echo $error,"\n"; |
|
46 | + echo $error, "\n"; |
|
47 | 47 | exit; |
48 | 48 | } |
49 | 49 | |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | // si hubo algún error al enviar al servidor mostrar |
54 | 54 | if ($result===false) { |
55 | 55 | foreach (\sasco\LibreDTE\Log::readAll() as $error) |
56 | - echo $error,"\n"; |
|
56 | + echo $error, "\n"; |
|
57 | 57 | exit; |
58 | 58 | } |
59 | 59 | |
60 | 60 | // Mostrar resultado del envío |
61 | 61 | if ($result->STATUS!='0') { |
62 | 62 | foreach (\sasco\LibreDTE\Log::readAll() as $error) |
63 | - echo $error,"\n"; |
|
63 | + echo $error, "\n"; |
|
64 | 64 | exit; |
65 | 65 | } |
66 | -echo 'DTE envíado. Track ID '.$result->TRACKID,"\n"; |
|
66 | +echo 'DTE envíado. Track ID '.$result->TRACKID, "\n"; |
@@ -42,8 +42,9 @@ discard block |
||
42 | 42 | // solicitar token |
43 | 43 | $token = \sasco\LibreDTE\Sii\Autenticacion::getToken($config['firma']); |
44 | 44 | if (!$token) { |
45 | - foreach (\sasco\LibreDTE\Log::readAll() as $error) |
|
46 | - echo $error,"\n"; |
|
45 | + foreach (\sasco\LibreDTE\Log::readAll() as $error) { |
|
46 | + echo $error,"\n"; |
|
47 | + } |
|
47 | 48 | exit; |
48 | 49 | } |
49 | 50 | |
@@ -52,15 +53,17 @@ discard block |
||
52 | 53 | |
53 | 54 | // si hubo algún error al enviar al servidor mostrar |
54 | 55 | if ($result===false) { |
55 | - foreach (\sasco\LibreDTE\Log::readAll() as $error) |
|
56 | - echo $error,"\n"; |
|
56 | + foreach (\sasco\LibreDTE\Log::readAll() as $error) { |
|
57 | + echo $error,"\n"; |
|
58 | + } |
|
57 | 59 | exit; |
58 | 60 | } |
59 | 61 | |
60 | 62 | // Mostrar resultado del envío |
61 | 63 | if ($result->STATUS!='0') { |
62 | - foreach (\sasco\LibreDTE\Log::readAll() as $error) |
|
63 | - echo $error,"\n"; |
|
64 | + foreach (\sasco\LibreDTE\Log::readAll() as $error) { |
|
65 | + echo $error,"\n"; |
|
66 | + } |
|
64 | 67 | exit; |
65 | 68 | } |
66 | 69 | echo 'DTE envíado. Track ID '.$result->TRACKID,"\n"; |
@@ -98,8 +98,9 @@ discard block |
||
98 | 98 | public function generar() |
99 | 99 | { |
100 | 100 | // si ya se había generado se entrega directamente |
101 | - if ($this->xml_data) |
|
102 | - return $this->xml_data; |
|
101 | + if ($this->xml_data) { |
|
102 | + return $this->xml_data; |
|
103 | + } |
|
103 | 104 | // si no hay respuestas para generar entregar falso |
104 | 105 | if (!isset($this->recibos[0])) { |
105 | 106 | \sasco\LibreDTE\Log::write( |
@@ -173,8 +174,9 @@ discard block |
||
173 | 174 | } |
174 | 175 | // crear recibos a partir del arreglo |
175 | 176 | $Recibos = $this->arreglo['EnvioRecibos']['SetRecibos']['Recibo']; |
176 | - if (!isset($Recibos[0])) |
|
177 | - $Recibos = [$Recibos]; |
|
177 | + if (!isset($Recibos[0])) { |
|
178 | + $Recibos = [$Recibos]; |
|
179 | + } |
|
178 | 180 | foreach ($Recibos as $Recibo) { |
179 | 181 | $this->recibos[] = $Recibo; |
180 | 182 | } |
@@ -40,8 +40,9 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function agregar(array $detalle, $normalizar = true) |
42 | 42 | { |
43 | - if ($normalizar) |
|
44 | - $this->normalizarDetalle($detalle); |
|
43 | + if ($normalizar) { |
|
44 | + $this->normalizarDetalle($detalle); |
|
45 | + } |
|
45 | 46 | $this->detalles[] = $detalle; |
46 | 47 | return true; |
47 | 48 | } |
@@ -138,8 +139,9 @@ discard block |
||
138 | 139 | 'TipoEnvio' => 'TOTAL', |
139 | 140 | 'FolioNotificacion' => null, |
140 | 141 | ], $caratula); |
141 | - if ($this->caratula['TipoEnvio']=='ESPECIAL') |
|
142 | - $this->caratula['FolioNotificacion'] = null; |
|
142 | + if ($this->caratula['TipoEnvio']=='ESPECIAL') { |
|
143 | + $this->caratula['FolioNotificacion'] = null; |
|
144 | + } |
|
143 | 145 | $this->id = 'LibreDTE_LIBRO_GUIA_'.str_replace('-', '', $this->caratula['RutEmisorLibro']).'_'.str_replace('-', '', $this->caratula['PeriodoTributario']).'_'.date('U'); |
144 | 146 | } |
145 | 147 | |
@@ -153,8 +155,9 @@ discard block |
||
153 | 155 | public function generar($incluirDetalle = true) |
154 | 156 | { |
155 | 157 | // si ya se había generado se entrega directamente |
156 | - if ($this->xml_data) |
|
157 | - return $this->xml_data; |
|
158 | + if ($this->xml_data) { |
|
159 | + return $this->xml_data; |
|
160 | + } |
|
158 | 161 | // generar XML del envío |
159 | 162 | $xmlEnvio = (new \sasco\LibreDTE\XML())->generate([ |
160 | 163 | 'LibroGuia' => [ |
@@ -79,11 +79,11 @@ discard block |
||
79 | 79 | } |
80 | 80 | // calcular valores que no se hayan entregado |
81 | 81 | if (!$detalle['IVA'] and $detalle['TasaImp'] and $detalle['MntNeto']) { |
82 | - $detalle['IVA'] = round($detalle['MntNeto'] * ($detalle['TasaImp']/100)); |
|
82 | + $detalle['IVA'] = round($detalle['MntNeto'] * ($detalle['TasaImp'] / 100)); |
|
83 | 83 | } |
84 | 84 | // calcular monto total si no se especificó |
85 | 85 | if ($detalle['MntTotal']===false) { |
86 | - $detalle['MntTotal'] = $detalle['MntNeto'] + $detalle['IVA']; |
|
86 | + $detalle['MntTotal'] = $detalle['MntNeto']+$detalle['IVA']; |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $data = \sasco\LibreDTE\CSV::read($archivo); |
101 | 101 | $n_data = count($data); |
102 | 102 | $detalles = []; |
103 | - for ($i=1; $i<$n_data; $i++) { |
|
103 | + for ($i = 1; $i<$n_data; $i++) { |
|
104 | 104 | // detalle genérico |
105 | 105 | $detalle = [ |
106 | 106 | 'Folio' => $data[$i][0], |
@@ -203,17 +203,17 @@ discard block |
||
203 | 203 | // se contabiliza si la guía está anulada |
204 | 204 | if ($d['Anulado']==1 or $d['Anulado']==2) { |
205 | 205 | if ($d['Anulado']==1) { |
206 | - $ResumenPeriodo['TotFolAnulado'] = (int)$ResumenPeriodo['TotFolAnulado'] + 1; |
|
206 | + $ResumenPeriodo['TotFolAnulado'] = (int)$ResumenPeriodo['TotFolAnulado']+1; |
|
207 | 207 | } else { |
208 | - $ResumenPeriodo['TotGuiaAnulada'] = (int)$ResumenPeriodo['TotGuiaAnulada'] + 1; |
|
208 | + $ResumenPeriodo['TotGuiaAnulada'] = (int)$ResumenPeriodo['TotGuiaAnulada']+1; |
|
209 | 209 | } |
210 | 210 | } |
211 | 211 | // si no está anulado |
212 | 212 | else { |
213 | 213 | // si es de venta |
214 | 214 | if ($d['TpoOper']==1) { |
215 | - $ResumenPeriodo['TotGuiaVenta'] = (int)$ResumenPeriodo['TotGuiaVenta'] + 1; |
|
216 | - $ResumenPeriodo['TotMntGuiaVta'] = (int)$ResumenPeriodo['TotMntGuiaVta'] + $d['MntTotal']; |
|
215 | + $ResumenPeriodo['TotGuiaVenta'] = (int)$ResumenPeriodo['TotGuiaVenta']+1; |
|
216 | + $ResumenPeriodo['TotMntGuiaVta'] = (int)$ResumenPeriodo['TotMntGuiaVta']+$d['MntTotal']; |
|
217 | 217 | } |
218 | 218 | // si no es de venta |
219 | 219 | else { |
@@ -73,10 +73,12 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function agregarRespuestaEnvio(array $datos) |
75 | 75 | { |
76 | - if (isset($this->respuesta_documentos[0])) |
|
77 | - return false; |
|
78 | - if (isset($this->respuesta_envios[$this->config['respuesta_envios_max']-1])) |
|
79 | - return false; |
|
76 | + if (isset($this->respuesta_documentos[0])) { |
|
77 | + return false; |
|
78 | + } |
|
79 | + if (isset($this->respuesta_envios[$this->config['respuesta_envios_max']-1])) { |
|
80 | + return false; |
|
81 | + } |
|
80 | 82 | $this->respuesta_envios[] = array_merge([ |
81 | 83 | 'NmbEnvio' => false, |
82 | 84 | 'FchRecep' => date('Y-m-d\TH:i:s'), |
@@ -102,10 +104,12 @@ discard block |
||
102 | 104 | */ |
103 | 105 | public function agregarRespuestaDocumento(array $datos) |
104 | 106 | { |
105 | - if (isset($this->respuesta_envios[0])) |
|
106 | - return false; |
|
107 | - if (isset($this->respuesta_documentos[$this->config['respuesta_documentos_max']-1])) |
|
108 | - return false; |
|
107 | + if (isset($this->respuesta_envios[0])) { |
|
108 | + return false; |
|
109 | + } |
|
110 | + if (isset($this->respuesta_documentos[$this->config['respuesta_documentos_max']-1])) { |
|
111 | + return false; |
|
112 | + } |
|
109 | 113 | $this->respuesta_documentos[] = array_merge([ |
110 | 114 | 'TipoDTE' => false, |
111 | 115 | 'Folio' => false, |
@@ -156,8 +160,9 @@ discard block |
||
156 | 160 | public function generar() |
157 | 161 | { |
158 | 162 | // si ya se había generado se entrega directamente |
159 | - if ($this->xml_data) |
|
160 | - return $this->xml_data; |
|
163 | + if ($this->xml_data) { |
|
164 | + return $this->xml_data; |
|
165 | + } |
|
161 | 166 | // si no hay respuestas para generar entregar falso |
162 | 167 | if (!isset($this->respuesta_envios[0]) and !isset($this->respuesta_documentos[0])) { |
163 | 168 | \sasco\LibreDTE\Log::write( |
@@ -230,8 +235,9 @@ discard block |
||
230 | 235 | */ |
231 | 236 | public function getRecepciones() |
232 | 237 | { |
233 | - if (!$this->esRecepcionEnvio()) |
|
234 | - return false; |
|
238 | + if (!$this->esRecepcionEnvio()) { |
|
239 | + return false; |
|
240 | + } |
|
235 | 241 | // si no hay respustas se deben crear |
236 | 242 | if (!$this->respuesta_envios) { |
237 | 243 | // si no está creado el arrelgo con los datos error |
@@ -242,8 +248,9 @@ discard block |
||
242 | 248 | if (isset($this->arreglo['RespuestaDTE']['Resultado']['RecepcionEnvio']['RecepcionDTE'])) { |
243 | 249 | // crear repuestas a partir del arreglo |
244 | 250 | $Recepciones = $this->arreglo['RespuestaDTE']['Resultado']['RecepcionEnvio']['RecepcionDTE']; |
245 | - if (!isset($Recepciones[0])) |
|
246 | - $Recepciones = [$Recepciones]; |
|
251 | + if (!isset($Recepciones[0])) { |
|
252 | + $Recepciones = [$Recepciones]; |
|
253 | + } |
|
247 | 254 | foreach ($Recepciones as $Recepcion) { |
248 | 255 | $this->respuesta_envios[] = $Recepcion; |
249 | 256 | } |
@@ -260,8 +267,9 @@ discard block |
||
260 | 267 | */ |
261 | 268 | public function getResultados() |
262 | 269 | { |
263 | - if (!$this->esResultadoDTE()) |
|
264 | - return false; |
|
270 | + if (!$this->esResultadoDTE()) { |
|
271 | + return false; |
|
272 | + } |
|
265 | 273 | // si no hay respustas se deben crear |
266 | 274 | if (!$this->respuesta_documentos) { |
267 | 275 | // si no está creado el arrelgo con los datos error |
@@ -270,8 +278,9 @@ discard block |
||
270 | 278 | } |
271 | 279 | // crear repuestas a partir del arreglo |
272 | 280 | $Resultados = $this->arreglo['RespuestaDTE']['Resultado']['ResultadoDTE']; |
273 | - if (!isset($Resultados[0])) |
|
274 | - $Resultados = [$Resultados]; |
|
281 | + if (!isset($Resultados[0])) { |
|
282 | + $Resultados = [$Resultados]; |
|
283 | + } |
|
275 | 284 | foreach ($Resultados as $Resultado) { |
276 | 285 | $this->respuesta_documentos[] = $Resultado; |
277 | 286 | } |
@@ -162,8 +162,9 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public static function getTipo($codigo) |
164 | 164 | { |
165 | - if (isset(self::$impuestos[$codigo])) |
|
166 | - return self::$impuestos[$codigo]['tipo']; |
|
165 | + if (isset(self::$impuestos[$codigo])) { |
|
166 | + return self::$impuestos[$codigo]['tipo']; |
|
167 | + } |
|
167 | 168 | return false; |
168 | 169 | } |
169 | 170 | |
@@ -175,8 +176,9 @@ discard block |
||
175 | 176 | */ |
176 | 177 | public static function getGlosa($codigo) |
177 | 178 | { |
178 | - if (isset(self::$impuestos[$codigo])) |
|
179 | - return self::$impuestos[$codigo]['glosa']; |
|
179 | + if (isset(self::$impuestos[$codigo])) { |
|
180 | + return self::$impuestos[$codigo]['glosa']; |
|
181 | + } |
|
180 | 182 | return 'Impto. cód. '.$codigo; |
181 | 183 | } |
182 | 184 | |
@@ -188,8 +190,9 @@ discard block |
||
188 | 190 | */ |
189 | 191 | public static function getTasa($codigo) |
190 | 192 | { |
191 | - if (isset(self::$impuestos[$codigo]['tasa'])) |
|
192 | - return self::$impuestos[$codigo]['tasa']; |
|
193 | + if (isset(self::$impuestos[$codigo]['tasa'])) { |
|
194 | + return self::$impuestos[$codigo]['tasa']; |
|
195 | + } |
|
193 | 196 | return false; |
194 | 197 | } |
195 | 198 |
@@ -138,7 +138,7 @@ |
||
138 | 138 | ]; |
139 | 139 | // agregar otros impuestos adicionales |
140 | 140 | if ($n_OtrosImp>1) { |
141 | - for ($i=1; $i<$n_OtrosImp; $i++) { |
|
141 | + for ($i = 1; $i<$n_OtrosImp; $i++) { |
|
142 | 142 | $detalle[] = [ |
143 | 143 | '', |
144 | 144 | '', |
@@ -57,8 +57,9 @@ discard block |
||
57 | 57 | { |
58 | 58 | $this->startPageGroup(); |
59 | 59 | $this->AddPage(); |
60 | - if (isset($libro['LibroCompraVenta'])) |
|
61 | - $libro = $libro['LibroCompraVenta']; |
|
60 | + if (isset($libro['LibroCompraVenta'])) { |
|
61 | + $libro = $libro['LibroCompraVenta']; |
|
62 | + } |
|
62 | 63 | // título del libro |
63 | 64 | $this->SetFont('helvetica', 'B', 16); |
64 | 65 | $this->Texto('Libro de '.ucfirst(strtolower($libro['EnvioLibro']['Caratula']['TipoOperacion'])), null, null, 'C'); |
@@ -109,8 +110,7 @@ discard block |
||
109 | 110 | $total_resumen['TotIVARetTotal'] += !empty($total['TotIVARetTotal']) ? $total['TotIVARetTotal'] : 0; |
110 | 111 | $total_resumen['TotIVANoRetenido'] += !empty($total['TotIVANoRetenido']) ? $total['TotIVANoRetenido'] : 0; |
111 | 112 | $total_resumen['TotMntTotal'] += $total['TotMntTotal']; |
112 | - } |
|
113 | - else if (in_array($total['TpoDoc'], $this->dte_tipo_operacion['resta'])) { |
|
113 | + } else if (in_array($total['TpoDoc'], $this->dte_tipo_operacion['resta'])) { |
|
114 | 114 | $total_resumen['TotMntExe'] -= !empty($total['TotMntExe']) ? $total['TotMntExe'] : 0; |
115 | 115 | $total_resumen['TotMntNeto'] -= !empty($total['TotMntNeto']) ? $total['TotMntNeto'] : 0; |
116 | 116 | $total_resumen['TotMntIVA'] -= !empty($total['TotMntIVA']) ? $total['TotMntIVA'] : 0; |
@@ -171,10 +171,13 @@ discard block |
||
171 | 171 | foreach ($libro['EnvioLibro']['Detalle'] as $d) { |
172 | 172 | // impuesto adicional |
173 | 173 | if (!empty($d['OtrosImp'])) { |
174 | - if (!isset($d['OtrosImp'][0])) |
|
175 | - $d['OtrosImp'] = [$d['OtrosImp']]; |
|
174 | + if (!isset($d['OtrosImp'][0])) { |
|
175 | + $d['OtrosImp'] = [$d['OtrosImp']]; |
|
176 | + } |
|
176 | 177 | $n_OtrosImp = count($d['OtrosImp']); |
177 | - } else $n_OtrosImp = 0; |
|
178 | + } else { |
|
179 | + $n_OtrosImp = 0; |
|
180 | + } |
|
178 | 181 | // se agrega detalle |
179 | 182 | $detalle[] = [ |
180 | 183 | $d['TpoDoc'], |
@@ -40,8 +40,9 @@ discard block |
||
40 | 40 | public function enviar() |
41 | 41 | { |
42 | 42 | // generar XML que se enviará |
43 | - if (!$this->xml_data) |
|
44 | - $this->xml_data = $this->generar(); |
|
43 | + if (!$this->xml_data) { |
|
44 | + $this->xml_data = $this->generar(); |
|
45 | + } |
|
45 | 46 | if (!$this->xml_data) { |
46 | 47 | \sasco\LibreDTE\Log::write( |
47 | 48 | \sasco\LibreDTE\Estado::DOCUMENTO_ERROR_GENERAR_XML, |
@@ -53,20 +54,24 @@ discard block |
||
53 | 54 | return false; |
54 | 55 | } |
55 | 56 | // validar schema del documento antes de enviar |
56 | - if (!$this->schemaValidate()) |
|
57 | - return false; |
|
57 | + if (!$this->schemaValidate()) { |
|
58 | + return false; |
|
59 | + } |
|
58 | 60 | // solicitar token |
59 | 61 | $token = \sasco\LibreDTE\Sii\Autenticacion::getToken($this->Firma); |
60 | - if (!$token) |
|
61 | - return false; |
|
62 | + if (!$token) { |
|
63 | + return false; |
|
64 | + } |
|
62 | 65 | // enviar DTE |
63 | 66 | $envia = $this->caratula['RutEnvia']; |
64 | 67 | $emisor = !empty($this->caratula['RutEmisor']) ? $this->caratula['RutEmisor'] : $this->caratula['RutEmisorLibro']; |
65 | 68 | $result = \sasco\LibreDTE\Sii::enviar($envia, $emisor, $this->xml_data, $token); |
66 | - if ($result===false) |
|
67 | - return false; |
|
68 | - if (!is_numeric((string)$result->TRACKID)) |
|
69 | - return false; |
|
69 | + if ($result===false) { |
|
70 | + return false; |
|
71 | + } |
|
72 | + if (!is_numeric((string)$result->TRACKID)) { |
|
73 | + return false; |
|
74 | + } |
|
70 | 75 | return (int)(string)$result->TRACKID; |
71 | 76 | } |
72 | 77 |
@@ -813,8 +813,9 @@ discard block |
||
813 | 813 | */ |
814 | 814 | public static function getGlosa($tag) |
815 | 815 | { |
816 | - if (!isset(self::$tablas[$tag])) |
|
817 | - return false; |
|
816 | + if (!isset(self::$tablas[$tag])) { |
|
817 | + return false; |
|
818 | + } |
|
818 | 819 | return is_array(self::$tablas[$tag]) ? self::$tablas[$tag]['glosa'] : self::$tablas[$tag]; |
819 | 820 | } |
820 | 821 | |
@@ -825,10 +826,12 @@ discard block |
||
825 | 826 | */ |
826 | 827 | public static function getValor($tag, $codigo) |
827 | 828 | { |
828 | - if (!isset(self::$tablas[$tag])) |
|
829 | - return false; |
|
830 | - if (!is_array(self::$tablas[$tag])) |
|
831 | - return $codigo; |
|
829 | + if (!isset(self::$tablas[$tag])) { |
|
830 | + return false; |
|
831 | + } |
|
832 | + if (!is_array(self::$tablas[$tag])) { |
|
833 | + return $codigo; |
|
834 | + } |
|
832 | 835 | $tabla = isset(self::$tablas[$tag]['valor']) ? self::$tablas[$tag]['valor'] : self::$tablas[self::$tablas[$tag]['tabla']]; |
833 | 836 | if ($tag=='TipoBultos') { |
834 | 837 | $valor = isset($tabla[$codigo['CodTpoBultos']]) ? $tabla[$codigo['CodTpoBultos']] : $codigo['CodTpoBultos']; |
@@ -868,8 +871,9 @@ discard block |
||
868 | 871 | { |
869 | 872 | self::$tablasInvertidas = []; |
870 | 873 | foreach (self::$tablas as $tag => $info) { |
871 | - if (is_string($info) or (!isset($info['valor']) and !isset($info['tabla']))) |
|
872 | - continue; |
|
874 | + if (is_string($info) or (!isset($info['valor']) and !isset($info['tabla']))) { |
|
875 | + continue; |
|
876 | + } |
|
873 | 877 | $tabla = isset($info['valor']) ? $info['valor'] : self::$tablas[$info['tabla']]; |
874 | 878 | foreach ($tabla as &$val) { |
875 | 879 | $val = str_replace( |
@@ -76,12 +76,12 @@ |
||
76 | 76 | if (!self::$formatos) { |
77 | 77 | $dir = dirname(__FILE__).'/Formatos'; |
78 | 78 | $formatos = scandir($dir); |
79 | - foreach($formatos as &$formato) { |
|
79 | + foreach ($formatos as &$formato) { |
|
80 | 80 | if ($formato[0]=='.') |
81 | 81 | continue; |
82 | 82 | if (is_dir($dir.'/'.$formato)) { |
83 | 83 | $subformatos = scandir($dir.'/'.$formato); |
84 | - foreach($subformatos as &$subformato) { |
|
84 | + foreach ($subformatos as &$subformato) { |
|
85 | 85 | if ($subformato[0]=='.') |
86 | 86 | continue; |
87 | 87 | self::$formatos[] = $formato.'.'.substr($subformato, 0, -4); |
@@ -77,13 +77,15 @@ |
||
77 | 77 | $dir = dirname(__FILE__).'/Formatos'; |
78 | 78 | $formatos = scandir($dir); |
79 | 79 | foreach($formatos as &$formato) { |
80 | - if ($formato[0]=='.') |
|
81 | - continue; |
|
80 | + if ($formato[0]=='.') { |
|
81 | + continue; |
|
82 | + } |
|
82 | 83 | if (is_dir($dir.'/'.$formato)) { |
83 | 84 | $subformatos = scandir($dir.'/'.$formato); |
84 | 85 | foreach($subformatos as &$subformato) { |
85 | - if ($subformato[0]=='.') |
|
86 | - continue; |
|
86 | + if ($subformato[0]=='.') { |
|
87 | + continue; |
|
88 | + } |
|
87 | 89 | self::$formatos[] = $formato.'.'.substr($subformato, 0, -4); |
88 | 90 | } |
89 | 91 | } else { |