@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ; |
123 | 123 | $company = $rutExists |
124 | 124 | ? $this->requestData['RutCompania'] |
125 | - . '-' . $this->requestData['DvCompania'] |
|
125 | + . '-'.$this->requestData['DvCompania'] |
|
126 | 126 | : null |
127 | 127 | ; |
128 | 128 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | ; |
133 | 133 | $recipient = $rutExists |
134 | 134 | ? $this->requestData['RutReceptor'] |
135 | - . '-' . $this->requestData['DvReceptor'] |
|
135 | + . '-'.$this->requestData['DvReceptor'] |
|
136 | 136 | : null |
137 | 137 | ; |
138 | 138 |
@@ -75,7 +75,7 @@ |
||
75 | 75 | ; |
76 | 76 | $company = $rutExists |
77 | 77 | ? $this->requestData['RutEmpresa'] |
78 | - . '-' . $this->requestData['DvEmpresa'] |
|
78 | + . '-'.$this->requestData['DvEmpresa'] |
|
79 | 79 | : null |
80 | 80 | ; |
81 | 81 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * @return string|false Nombre de la ciudad asociada o `false` si no se |
60 | 60 | * encuentra. |
61 | 61 | */ |
62 | - public function getCiudad(string $comuna): string|false |
|
62 | + public function getCiudad(string $comuna): string | false |
|
63 | 63 | { |
64 | 64 | return $this->dataProvider->getValue( |
65 | 65 | 'ciudades', |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @return string|int Valor asociado al código o el propio código si no se |
68 | 68 | * encuentra. |
69 | 69 | */ |
70 | - public function getValor(string|int $codigo): string|int |
|
70 | + public function getValor(string | int $codigo): string | int |
|
71 | 71 | { |
72 | 72 | return $this->dataProvider->getValue($this->dataKey, $codigo); |
73 | 73 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @return string|int Código asociado al valor o el propio valor si no se |
80 | 80 | * encuentra. |
81 | 81 | */ |
82 | - public function getCodigo(string|int $valor): string|int |
|
82 | + public function getCodigo(string | int $valor): string | int |
|
83 | 83 | { |
84 | 84 | $data = $this->dataProvider->getData($this->dataKey); |
85 | 85 | return array_search($valor, $data, true) ?: $valor; |
@@ -162,7 +162,7 @@ |
||
162 | 162 | * @param string|int $codigo Código del documento para buscar sus datos. |
163 | 163 | * @return array Arreglo con los datos asociados al documento. |
164 | 164 | */ |
165 | - public function getData(string|int $codigo): array |
|
165 | + public function getData(string | int $codigo): array |
|
166 | 166 | { |
167 | 167 | $data = $this->dataProvider->getValue('documentos', $codigo); |
168 | 168 | $data = array_merge($this->defaultData, ['codigo' => $codigo], $data); |
@@ -80,6 +80,6 @@ |
||
80 | 80 | return $direccionRegional ?? $comuna; |
81 | 81 | } |
82 | 82 | |
83 | - return 'SUC ' . $comuna; |
|
83 | + return 'SUC '.$comuna; |
|
84 | 84 | } |
85 | 85 | } |
@@ -99,7 +99,7 @@ |
||
99 | 99 | */ |
100 | 100 | public function getValue( |
101 | 101 | string $key, |
102 | - string|int $code, |
|
102 | + string | int $code, |
|
103 | 103 | mixed $default = null |
104 | 104 | ): mixed; |
105 | 105 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @param string $file Ruta hacia el fichero. |
56 | 56 | * @return string|false Mimetype del fichero o false si no se pudo determinar. |
57 | 57 | */ |
58 | - public static function mimetype(string $file): string|false |
|
58 | + public static function mimetype(string $file): string | false |
|
59 | 59 | { |
60 | 60 | if (!file_exists($file)) { |
61 | 61 | return false; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | )); |
87 | 87 | } |
88 | 88 | |
89 | - $zipFilePath = $file . '.zip'; |
|
89 | + $zipFilePath = $file.'.zip'; |
|
90 | 90 | |
91 | 91 | self::zip($file, $zipFilePath); |
92 | 92 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ); |
140 | 140 | foreach ($finder as $foundFile) { |
141 | 141 | if (!$foundFile->isDir()) { |
142 | - $localName = str_replace($file . DIRECTORY_SEPARATOR, '', $foundFile->getPathname()); |
|
142 | + $localName = str_replace($file.DIRECTORY_SEPARATOR, '', $foundFile->getPathname()); |
|
143 | 143 | $zip->addFileFromPath($localName, $foundFile->getPathname()); |
144 | 144 | } |
145 | 145 | } |
@@ -170,11 +170,11 @@ discard block |
||
170 | 170 | |
171 | 171 | $mimetype = self::mimetype($file); |
172 | 172 | if ($mimetype) { |
173 | - header('Content-Type: ' . $mimetype); |
|
173 | + header('Content-Type: '.$mimetype); |
|
174 | 174 | } |
175 | 175 | |
176 | - header('Content-Disposition: attachment; filename="' . basename($file) . '"'); |
|
177 | - header('Content-Length: ' . filesize($file)); |
|
176 | + header('Content-Disposition: attachment; filename="'.basename($file).'"'); |
|
177 | + header('Content-Length: '.filesize($file)); |
|
178 | 178 | header('Pragma: no-cache'); |
179 | 179 | header('Expires: 0'); |
180 | 180 |
@@ -118,7 +118,7 @@ |
||
118 | 118 | // Traducir los errores. |
119 | 119 | foreach ($errors as &$error) { |
120 | 120 | foreach ($translations as $code => $trans) { |
121 | - if (str_contains($error, 'error:' . $code)) { |
|
121 | + if (str_contains($error, 'error:'.$code)) { |
|
122 | 122 | $error = sprintf('%s (Error #%s).', $trans, $code); |
123 | 123 | } |
124 | 124 | } |