@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 135 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 136 | 136 | /** |
| 137 | 137 | * Output header of an example file for this format |
| 138 | 138 | * |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function write_header_example($outputlangs) |
| 143 | 143 | { |
| 144 | - // phpcs:enable |
|
| 144 | + // phpcs:enable |
|
| 145 | 145 | global $user, $conf, $langs, $file; |
| 146 | 146 | // create a temporary object, the final output will be generated in footer |
| 147 | 147 | $this->workbook->getProperties()->setCreator($user->getFullName($outputlangs) . ' - Dolibarr ' . DOL_VERSION); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | return ''; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 159 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 160 | 160 | /** |
| 161 | 161 | * Output title line of an example file for this format |
| 162 | 162 | * |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function write_title_example($outputlangs, $headerlinefields) |
| 168 | 168 | { |
| 169 | - // phpcs:enable |
|
| 169 | + // phpcs:enable |
|
| 170 | 170 | global $conf; |
| 171 | 171 | $this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true); |
| 172 | 172 | $this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | return ''; // final output will be generated in footer |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 185 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 186 | 186 | /** |
| 187 | 187 | * Output record of an example file for this format |
| 188 | 188 | * |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function write_record_example($outputlangs, $contentlinevalues) |
| 194 | 194 | { |
| 195 | - // phpcs:enable |
|
| 195 | + // phpcs:enable |
|
| 196 | 196 | $col = 1; |
| 197 | 197 | $row = 2; |
| 198 | 198 | foreach ($contentlinevalues as $cell) { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | return ''; // final output will be generated in footer |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 206 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 207 | 207 | /** |
| 208 | 208 | * Output footer of an example file for this format |
| 209 | 209 | * |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function write_footer_example($outputlangs) |
| 214 | 214 | { |
| 215 | - // phpcs:enable |
|
| 215 | + // phpcs:enable |
|
| 216 | 216 | // return the file content as a string |
| 217 | 217 | $tempfile = tempnam(sys_get_temp_dir(), 'dol'); |
| 218 | 218 | $objWriter = new PhpOffice\PhpSpreadsheet\Writer\Xlsx($this->workbook); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | |
| 229 | 229 | |
| 230 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 230 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 231 | 231 | /** |
| 232 | 232 | * Open input file |
| 233 | 233 | * |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public function import_open_file($file) |
| 238 | 238 | { |
| 239 | - // phpcs:enable |
|
| 239 | + // phpcs:enable |
|
| 240 | 240 | global $langs; |
| 241 | 241 | $ret = 1; |
| 242 | 242 | |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
| 254 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 254 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 255 | 255 | /** |
| 256 | 256 | * Return nb of records. File must be closed. |
| 257 | 257 | * |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | public function import_get_nb_of_lines($file) |
| 262 | 262 | { |
| 263 | - // phpcs:enable |
|
| 263 | + // phpcs:enable |
|
| 264 | 264 | $reader = new Xlsx(); |
| 265 | 265 | $this->workbook = $reader->load($file); |
| 266 | 266 | |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | |
| 276 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 276 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 277 | 277 | /** |
| 278 | 278 | * Input header line from file |
| 279 | 279 | * |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | public function import_read_header() |
| 283 | 283 | { |
| 284 | - // phpcs:enable |
|
| 284 | + // phpcs:enable |
|
| 285 | 285 | // This is not called by the import code !!! |
| 286 | 286 | $this->headers = array(); |
| 287 | 287 | $xlsx = new Xlsx(); |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | |
| 297 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 297 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 298 | 298 | /** |
| 299 | 299 | * Return array of next record in input file. |
| 300 | 300 | * |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function import_read_record() |
| 304 | 304 | { |
| 305 | - // phpcs:enable |
|
| 305 | + // phpcs:enable |
|
| 306 | 306 | global $conf; |
| 307 | 307 | |
| 308 | 308 | $rowcount = $this->workbook->getActiveSheet()->getHighestDataRow(); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | return $array; |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 325 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 326 | 326 | /** |
| 327 | 327 | * Close file handle |
| 328 | 328 | * |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | public function import_close_file() |
| 332 | 332 | { |
| 333 | - // phpcs:enable |
|
| 333 | + // phpcs:enable |
|
| 334 | 334 | $this->workbook->disconnectWorksheets(); |
| 335 | 335 | unset($this->workbook); |
| 336 | 336 | return 0; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | |
| 340 | 340 | // What is this doing here ? it is common to all imports, is should be in the parent class |
| 341 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 341 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 342 | 342 | /** |
| 343 | 343 | * Insert a record into database |
| 344 | 344 | * |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | */ |
| 353 | 353 | public function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) |
| 354 | 354 | { |
| 355 | - // phpcs:enable |
|
| 355 | + // phpcs:enable |
|
| 356 | 356 | global $langs, $conf, $user; |
| 357 | 357 | global $thirdparty_static; // Specific to thirdparty import |
| 358 | 358 | global $tablewithentity_cache; // Cache to avoid to call desc at each rows on tables |