@@ -314,7 +314,7 @@ |
||
| 314 | 314 | return $this->LibStatut($this->active, $mode); |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 317 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 318 | 318 | /** |
| 319 | 319 | * Return the label of a given status |
| 320 | 320 | * |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | |
| 417 | 417 | |
| 418 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 418 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 419 | 419 | /** |
| 420 | 420 | * Link the discount to a particular invoice line or a particular invoice. |
| 421 | 421 | * When discount is a global discount used as an invoice line, we link using rowidline. |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | */ |
| 428 | 428 | public function link_to_invoice($rowidline, $rowidinvoice) |
| 429 | 429 | { |
| 430 | - // phpcs:enable |
|
| 430 | + // phpcs:enable |
|
| 431 | 431 | // Check parameters |
| 432 | 432 | if (!$rowidline && !$rowidinvoice) { |
| 433 | 433 | $this->error = 'ErrorBadParameters'; |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | |
| 477 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 477 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 478 | 478 | /** |
| 479 | 479 | * Link the discount to a particular invoice line or a particular invoice. |
| 480 | 480 | * Do not call this if discount is linked to a reconcialiated invoice |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | */ |
| 484 | 484 | public function unlink_invoice() |
| 485 | 485 | { |
| 486 | - // phpcs:enable |
|
| 486 | + // phpcs:enable |
|
| 487 | 487 | $sql = "UPDATE " . $this->db->prefix() . "societe_remise_except"; |
| 488 | 488 | if (!empty($this->discount_type)) { |
| 489 | 489 | $sql .= " SET fk_invoice_supplier_line = NULL, fk_invoice_supplier = NULL"; |
@@ -47,16 +47,16 @@ |
||
| 47 | 47 | public $total_ht; |
| 48 | 48 | public $total_tva; |
| 49 | 49 | public $total_ttc; |
| 50 | - public $amount_ht; // deprecated |
|
| 50 | + public $amount_ht; // deprecated |
|
| 51 | 51 | public $amount_tva; // deprecated |
| 52 | 52 | public $amount_ttc; // deprecated |
| 53 | 53 | |
| 54 | 54 | public $multicurrency_total_ht; |
| 55 | 55 | public $multicurrency_total_tva; |
| 56 | 56 | public $multicurrency_total_ttc; |
| 57 | - public $multicurrency_amount_ht; // deprecated |
|
| 58 | - public $multicurrency_amount_tva; // deprecated |
|
| 59 | - public $multicurrency_amount_ttc; // deprecated |
|
| 57 | + public $multicurrency_amount_ht; // deprecated |
|
| 58 | + public $multicurrency_amount_tva; // deprecated |
|
| 59 | + public $multicurrency_amount_ttc; // deprecated |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * @var double |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | // Here we have low level of shared code called by XxxStats.class.php |
| 382 | 382 | |
| 383 | 383 | |
| 384 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 384 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 385 | 385 | /** |
| 386 | 386 | * Return nb of elements by year |
| 387 | 387 | * |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | */ |
| 391 | 391 | protected function _getNbByYear($sql) |
| 392 | 392 | { |
| 393 | - // phpcs:enable |
|
| 393 | + // phpcs:enable |
|
| 394 | 394 | $result = array(); |
| 395 | 395 | |
| 396 | 396 | dol_syslog(get_class($this) . '::' . __FUNCTION__, LOG_DEBUG); |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | return $result; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 413 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 414 | 414 | /** |
| 415 | 415 | * Return nb of elements, total amount and avg amount each year |
| 416 | 416 | * |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | */ |
| 420 | 420 | protected function _getAllByYear($sql) |
| 421 | 421 | { |
| 422 | - // phpcs:enable |
|
| 422 | + // phpcs:enable |
|
| 423 | 423 | $result = array(); |
| 424 | 424 | |
| 425 | 425 | dol_syslog(get_class($this) . '::' . __FUNCTION__, LOG_DEBUG); |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | return $result; |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 467 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 468 | 468 | /** |
| 469 | 469 | * Renvoie le nombre de documents par mois pour une annee donnee |
| 470 | 470 | * Return number of documents per month for a given year |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | */ |
| 477 | 477 | protected function _getNbByMonth($year, $sql, $format = 0) |
| 478 | 478 | { |
| 479 | - // phpcs:enable |
|
| 479 | + // phpcs:enable |
|
| 480 | 480 | global $langs; |
| 481 | 481 | |
| 482 | 482 | $result = array(); |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | return $data; |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 525 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 526 | 526 | /** |
| 527 | 527 | * Return the amount per month for a given year |
| 528 | 528 | * |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | */ |
| 534 | 534 | protected function _getAmountByMonth($year, $sql, $format = 0) |
| 535 | 535 | { |
| 536 | - // phpcs:enable |
|
| 536 | + // phpcs:enable |
|
| 537 | 537 | global $langs; |
| 538 | 538 | |
| 539 | 539 | $result = array(); |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | return $data; |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 582 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 583 | 583 | /** |
| 584 | 584 | * Renvoie le montant moyen par mois pour une annee donnee |
| 585 | 585 | * Return the amount average par month for a given year |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | */ |
| 592 | 592 | protected function _getAverageByMonth($year, $sql, $format = 0) |
| 593 | 593 | { |
| 594 | - // phpcs:enable |
|
| 594 | + // phpcs:enable |
|
| 595 | 595 | global $langs; |
| 596 | 596 | |
| 597 | 597 | $result = array(); |
@@ -638,7 +638,7 @@ discard block |
||
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | |
| 641 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 641 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 642 | 642 | /** |
| 643 | 643 | * Return number or total of product refs |
| 644 | 644 | * |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | */ |
| 649 | 649 | protected function _getAllByProduct($sql, $limit = 10) |
| 650 | 650 | { |
| 651 | - // phpcs:enable |
|
| 651 | + // phpcs:enable |
|
| 652 | 652 | global $langs; |
| 653 | 653 | |
| 654 | 654 | $result = array(); |
@@ -679,7 +679,7 @@ discard block |
||
| 679 | 679 | return $result; |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 682 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 683 | 683 | /** |
| 684 | 684 | * Returns the summed amounts per year for a given number of past years ending now |
| 685 | 685 | * @param string $sql SQL |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $this->db = $db; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 63 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 64 | 64 | /** |
| 65 | 65 | * Scan a file with antivirus. |
| 66 | 66 | * This function runs the command defined in setup. This antivirus command must return 0 if OK. |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function dol_avscan_file($file) |
| 73 | 73 | { |
| 74 | - // phpcs:enable |
|
| 74 | + // phpcs:enable |
|
| 75 | 75 | global $conf; |
| 76 | 76 | |
| 77 | 77 | if (preg_match('/\.virus$/i', $file)) { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | |
| 196 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 196 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 197 | 197 | /** |
| 198 | 198 | * Define array with couple substitution key => substitution value |
| 199 | 199 | * |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | public function get_substitutionarray_user($user, $outputlangs) |
| 205 | 205 | { |
| 206 | - // phpcs:enable |
|
| 206 | + // phpcs:enable |
|
| 207 | 207 | global $conf, $extrafields; |
| 208 | 208 | |
| 209 | 209 | $logotouse = $conf->user->dir_output . '/' . get_exdir(0, 0, 0, 0, $user, 'user') . 'photos/' . getImageFileNameForSize($user->photo, '_small'); |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | |
| 292 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 292 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 293 | 293 | /** |
| 294 | 294 | * Define array with couple substitution key => substitution value |
| 295 | 295 | * |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | public function get_substitutionarray_mysoc($mysoc, $outputlangs) |
| 301 | 301 | { |
| 302 | - // phpcs:enable |
|
| 302 | + // phpcs:enable |
|
| 303 | 303 | global $conf; |
| 304 | 304 | |
| 305 | 305 | if (empty($mysoc->forme_juridique) && !empty($mysoc->forme_juridique_code)) { |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | |
| 349 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 349 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 350 | 350 | /** |
| 351 | 351 | * Define array with couple substitution key => substitution value |
| 352 | 352 | * For example {company_name}, {company_name_alias} |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | public function get_substitutionarray_thirdparty($object, $outputlangs, $array_key = 'company') |
| 360 | 360 | { |
| 361 | - // phpcs:enable |
|
| 361 | + // phpcs:enable |
|
| 362 | 362 | global $extrafields; |
| 363 | 363 | |
| 364 | 364 | if (empty($object->country) && !empty($object->country_code)) { |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | return $array_thirdparty; |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 415 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 416 | 416 | /** |
| 417 | 417 | * Define array with couple substitution key => substitution value |
| 418 | 418 | * |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | */ |
| 424 | 424 | public function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object') |
| 425 | 425 | { |
| 426 | - // phpcs:enable |
|
| 426 | + // phpcs:enable |
|
| 427 | 427 | global $conf, $extrafields; |
| 428 | 428 | |
| 429 | 429 | if (empty($object->country) && !empty($object->country_code)) { |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | |
| 475 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 475 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 476 | 476 | /** |
| 477 | 477 | * Define array with couple substitution key => substitution value |
| 478 | 478 | * |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | */ |
| 482 | 482 | public function get_substitutionarray_other($outputlangs) |
| 483 | 483 | { |
| 484 | - // phpcs:enable |
|
| 484 | + // phpcs:enable |
|
| 485 | 485 | global $conf; |
| 486 | 486 | |
| 487 | 487 | $now = dol_now('gmt'); // gmt |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | } |
| 513 | 513 | |
| 514 | 514 | |
| 515 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 515 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 516 | 516 | /** |
| 517 | 517 | * Define array with couple substitution key => substitution value |
| 518 | 518 | * Note that vars into substitutions array are formatted. |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | */ |
| 525 | 525 | public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') |
| 526 | 526 | { |
| 527 | - // phpcs:enable |
|
| 527 | + // phpcs:enable |
|
| 528 | 528 | global $extrafields; |
| 529 | 529 | |
| 530 | 530 | $sumpayed = $sumdeposit = $sumcreditnote = ''; |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | return $resarray; |
| 716 | 716 | } |
| 717 | 717 | |
| 718 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 718 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 719 | 719 | /** |
| 720 | 720 | * Define array with couple substitution key => substitution value |
| 721 | 721 | * Note that vars into substitutions array are formatted. |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | */ |
| 728 | 728 | public function get_substitutionarray_lines($line, $outputlangs, $linenumber = 0) |
| 729 | 729 | { |
| 730 | - // phpcs:enable |
|
| 730 | + // phpcs:enable |
|
| 731 | 731 | $resarray = array( |
| 732 | 732 | 'line_pos' => $linenumber, |
| 733 | 733 | 'line_fulldesc' => doc_getlinedesc($line, $outputlangs), |
@@ -839,7 +839,7 @@ discard block |
||
| 839 | 839 | return $resarray; |
| 840 | 840 | } |
| 841 | 841 | |
| 842 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 842 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 843 | 843 | /** |
| 844 | 844 | * Define array with couple substitution key => substitution value |
| 845 | 845 | * Note that vars into substitutions array are formatted. |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | */ |
| 852 | 852 | public function get_substitutionarray_shipment($object, $outputlangs, $array_key = 'object') |
| 853 | 853 | { |
| 854 | - // phpcs:enable |
|
| 854 | + // phpcs:enable |
|
| 855 | 855 | global $extrafields; |
| 856 | 856 | |
| 857 | 857 | include_once DOL_DOCUMENT_ROOT . '/core/lib/product.lib.php'; |
@@ -908,7 +908,7 @@ discard block |
||
| 908 | 908 | } |
| 909 | 909 | |
| 910 | 910 | |
| 911 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 911 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 912 | 912 | /** |
| 913 | 913 | * Define array with couple substitution key => substitution value |
| 914 | 914 | * |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | */ |
| 920 | 920 | public function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = 1) |
| 921 | 921 | { |
| 922 | - // phpcs:enable |
|
| 922 | + // phpcs:enable |
|
| 923 | 923 | $array_other = array(); |
| 924 | 924 | if (!empty($object)) { |
| 925 | 925 | foreach ($object as $key => $value) { |
@@ -948,7 +948,7 @@ discard block |
||
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | |
| 951 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 951 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 952 | 952 | /** |
| 953 | 953 | * Fill array with couple extrafield key => extrafield value |
| 954 | 954 | * Note that vars into substitutions array are formatted. |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | */ |
| 963 | 963 | public function fill_substitutionarray_with_extrafields($object, $array_to_fill, $extrafields, $array_key, $outputlangs) |
| 964 | 964 | { |
| 965 | - // phpcs:enable |
|
| 965 | + // phpcs:enable |
|
| 966 | 966 | global $conf; |
| 967 | 967 | |
| 968 | 968 | if ($extrafields->attributes[$object->table_element]['count'] > 0) { |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | public $posxlabel; |
| 167 | 167 | public $posxup; |
| 168 | 168 | public $posxref; |
| 169 | - public $posxpicture; // For picture |
|
| 170 | - public $posxdesc; // For description |
|
| 169 | + public $posxpicture; // For picture |
|
| 170 | + public $posxdesc; // For description |
|
| 171 | 171 | public $posxqty; |
| 172 | 172 | public $posxpuht; |
| 173 | 173 | public $posxtva; |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | |
| 547 | 547 | if (get_class($object) == 'CommandeFournisseur') { |
| 548 | 548 | /** @var CommandeFournisseur $object*/ |
| 549 | - $object->date_validation = $object->date_valid; |
|
| 549 | + $object->date_validation = $object->date_valid; |
|
| 550 | 550 | $object->date_commande = $object->date; |
| 551 | 551 | } |
| 552 | 552 | $resarray = array( |
@@ -1500,7 +1500,7 @@ discard block |
||
| 1500 | 1500 | * @param stdClass $b |
| 1501 | 1501 | * @return int<-1,1> |
| 1502 | 1502 | */ |
| 1503 | - static function ($a, $b) { |
|
| 1503 | + static function($a, $b) { |
|
| 1504 | 1504 | return ($a->rank > $b->rank) ? 1 : -1; |
| 1505 | 1505 | } |
| 1506 | 1506 | ); |
@@ -126,9 +126,9 @@ discard block |
||
| 126 | 126 | * Message Sensitivity |
| 127 | 127 | */ |
| 128 | 128 | private $_arySensitivity = array(false, |
| 129 | - 'Personal', |
|
| 130 | - 'Private', |
|
| 131 | - 'Company Confidential'); |
|
| 129 | + 'Personal', |
|
| 130 | + 'Private', |
|
| 131 | + 'Company Confidential'); |
|
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | 134 | * Message Sensitivity |
@@ -156,12 +156,12 @@ discard block |
||
| 156 | 156 | * Content-Transfer-Encoding |
| 157 | 157 | */ |
| 158 | 158 | private $_smtpsTransEncodeTypes = array('7bit', // Simple 7-bit ASCII |
| 159 | - '8bit', // 8-bit coding with line termination characters |
|
| 160 | - 'base64', // 3 octets encoded into 4 sextets with offset |
|
| 161 | - 'binary', // Arbitrary binary stream |
|
| 162 | - 'mac-binhex40', // Macintosh binary to hex encoding |
|
| 163 | - 'quoted-printable', // Mostly 7-bit, with 8-bit characters encoded as "=HH" |
|
| 164 | - 'uuencode'); // UUENCODE encoding |
|
| 159 | + '8bit', // 8-bit coding with line termination characters |
|
| 160 | + 'base64', // 3 octets encoded into 4 sextets with offset |
|
| 161 | + 'binary', // Arbitrary binary stream |
|
| 162 | + 'mac-binhex40', // Macintosh binary to hex encoding |
|
| 163 | + 'quoted-printable', // Mostly 7-bit, with 8-bit characters encoded as "=HH" |
|
| 164 | + 'uuencode'); // UUENCODE encoding |
|
| 165 | 165 | |
| 166 | 166 | /** |
| 167 | 167 | * Content-Transfer-Encoding |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $_aryToList = $this->getTo(); |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 389 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 390 | 390 | /** |
| 391 | 391 | * Attempt a connection to mail server |
| 392 | 392 | * |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | */ |
| 395 | 395 | private function _server_connect() |
| 396 | 396 | { |
| 397 | - // phpcs:enable |
|
| 397 | + // phpcs:enable |
|
| 398 | 398 | // Default return value |
| 399 | 399 | $_retVal = true; |
| 400 | 400 | |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | return $_retVal; |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 467 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 468 | 468 | /** |
| 469 | 469 | * Attempt mail server authentication for a secure connection |
| 470 | 470 | * |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | */ |
| 473 | 473 | private function _server_authenticate() |
| 474 | 474 | { |
| 475 | - // phpcs:enable |
|
| 475 | + // phpcs:enable |
|
| 476 | 476 | global $conf; |
| 477 | 477 | |
| 478 | 478 | require_once DOL_DOCUMENT_ROOT . '/core/lib/geturl.lib.php'; |
@@ -1199,7 +1199,7 @@ discard block |
||
| 1199 | 1199 | $this->_msgRecipients = $aryHost; |
| 1200 | 1200 | } |
| 1201 | 1201 | |
| 1202 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1202 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1203 | 1203 | /** |
| 1204 | 1204 | * Returns an array of the various parts of an email address |
| 1205 | 1205 | * This assumes a well formed address: |
@@ -1218,7 +1218,7 @@ discard block |
||
| 1218 | 1218 | */ |
| 1219 | 1219 | private function _strip_email($_strAddr) |
| 1220 | 1220 | { |
| 1221 | - // phpcs:enable |
|
| 1221 | + // phpcs:enable |
|
| 1222 | 1222 | $_aryEmail = array(); |
| 1223 | 1223 | // Keep the original |
| 1224 | 1224 | $_aryEmail['org'] = $_strAddr; |
@@ -1255,7 +1255,7 @@ discard block |
||
| 1255 | 1255 | return $_aryEmail; |
| 1256 | 1256 | } |
| 1257 | 1257 | |
| 1258 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1258 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1259 | 1259 | /** |
| 1260 | 1260 | * Returns an array of bares addresses for use with 'RCPT TO:' |
| 1261 | 1261 | * This is a "build as you go" method. Each time this method is called |
@@ -1265,7 +1265,7 @@ discard block |
||
| 1265 | 1265 | */ |
| 1266 | 1266 | public function get_RCPT_list() |
| 1267 | 1267 | { |
| 1268 | - // phpcs:enable |
|
| 1268 | + // phpcs:enable |
|
| 1269 | 1269 | /** |
| 1270 | 1270 | * An array of bares addresses for use with 'RCPT TO:' |
| 1271 | 1271 | */ |
@@ -1284,7 +1284,7 @@ discard block |
||
| 1284 | 1284 | return $_RCPT_list; |
| 1285 | 1285 | } |
| 1286 | 1286 | |
| 1287 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1287 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1288 | 1288 | /** |
| 1289 | 1289 | * Returns an array of addresses for a specific type; TO, CC or BCC |
| 1290 | 1290 | * |
@@ -1293,7 +1293,7 @@ discard block |
||
| 1293 | 1293 | */ |
| 1294 | 1294 | public function get_email_list($_which = null) |
| 1295 | 1295 | { |
| 1296 | - // phpcs:enable |
|
| 1296 | + // phpcs:enable |
|
| 1297 | 1297 | // We need to know which address segment to pull |
| 1298 | 1298 | if ($_which) { |
| 1299 | 1299 | // Make sure we have addresses to process |
@@ -1900,7 +1900,7 @@ discard block |
||
| 1900 | 1900 | return ''; |
| 1901 | 1901 | } |
| 1902 | 1902 | |
| 1903 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1903 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1904 | 1904 | /** |
| 1905 | 1905 | * This function has been modified as provided by SirSir to allow multiline responses when |
| 1906 | 1906 | * using SMTP Extensions |
@@ -1913,7 +1913,7 @@ discard block |
||
| 1913 | 1913 | */ |
| 1914 | 1914 | public function server_parse($socket, $response) |
| 1915 | 1915 | { |
| 1916 | - // phpcs:enable |
|
| 1916 | + // phpcs:enable |
|
| 1917 | 1917 | /** |
| 1918 | 1918 | * Returns constructed SELECT Object string or boolean upon failure |
| 1919 | 1919 | * Default value is set at true |
@@ -1945,7 +1945,7 @@ discard block |
||
| 1945 | 1945 | return $_retVal; |
| 1946 | 1946 | } |
| 1947 | 1947 | |
| 1948 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1948 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1949 | 1949 | /** |
| 1950 | 1950 | * Send str |
| 1951 | 1951 | * |
@@ -1956,7 +1956,7 @@ discard block |
||
| 1956 | 1956 | */ |
| 1957 | 1957 | public function socket_send_str($_strSend, $_returnCode = null, $CRLF = "\r\n") |
| 1958 | 1958 | { |
| 1959 | - // phpcs:enable |
|
| 1959 | + // phpcs:enable |
|
| 1960 | 1960 | if ($this->_debug) { |
| 1961 | 1961 | $this->log .= $_strSend; // @CHANGE LDR for log |
| 1962 | 1962 | } |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | } |
| 589 | 589 | // Most servers expect a 2nd pass of EHLO after TLS is established to get another time |
| 590 | 590 | // the answer with list of supported AUTH methods. They may differs between non STARTTLS and with STARTTLS. |
| 591 | - if (! $_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) { |
|
| 591 | + if (!$_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) { |
|
| 592 | 592 | $this->_setErr(126, '"' . $hosth . '" does not support authenticated connections or temporary error. Error after 2nd sending EHLO ' . $hosth . ' : ' . $this->lastretval); |
| 593 | 593 | return $_retVal; |
| 594 | 594 | } |
@@ -1709,7 +1709,7 @@ discard block |
||
| 1709 | 1709 | $this->_msgContent['attachment'][$strFileName]['mimeType'] = $strMimeType; |
| 1710 | 1710 | $this->_msgContent['attachment'][$strFileName]['fileName'] = $strFileName; |
| 1711 | 1711 | $this->_msgContent['attachment'][$strFileName]['data'] = $strContent; |
| 1712 | - $this->_msgContent['attachment'][$strFileName]['cid'] = $strCid; // If defined, it means this attachment must be shown inline |
|
| 1712 | + $this->_msgContent['attachment'][$strFileName]['cid'] = $strCid; // If defined, it means this attachment must be shown inline |
|
| 1713 | 1713 | |
| 1714 | 1714 | if ($this->getMD5flag()) { |
| 1715 | 1715 | $this->_msgContent['attachment'][$strFileName]['md5'] = dol_hash($strContent, 3); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | public $code; // Code of format |
| 72 | 72 | |
| 73 | - // phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore |
|
| 73 | + // phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore |
|
| 74 | 74 | // protected |
| 75 | 75 | // Name of stick |
| 76 | 76 | protected $_Avery_Name = ''; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @var array |
| 110 | 110 | */ |
| 111 | 111 | public $_Avery_Labels; |
| 112 | - // phpcs:enable |
|
| 112 | + // phpcs:enable |
|
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Constructor |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $this->db = $db; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 124 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 125 | 125 | /** |
| 126 | 126 | * Function to build PDF on disk, then output on HTTP stream. |
| 127 | 127 | * |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @return int 1=OK, 0=KO |
| 133 | 133 | */ |
| 134 | 134 | abstract public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = ''); |
| 135 | - // phpcs:enable |
|
| 135 | + // phpcs:enable |
|
| 136 | 136 | |
| 137 | 137 | /** |
| 138 | 138 | * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | abstract public function addSticker(&$pdf, $outputlangs, $param); |
| 146 | 146 | |
| 147 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 147 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 148 | 148 | /** |
| 149 | 149 | * Methode qui permet de modifier la taille des caracteres |
| 150 | 150 | * Cela modiera aussi l'espace entre chaque ligne |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function Set_Char_Size(&$pdf, $pt) |
| 157 | 157 | { |
| 158 | - // phpcs:enable |
|
| 158 | + // phpcs:enable |
|
| 159 | 159 | if ($pt > 3) { |
| 160 | 160 | $this->_Char_Size = $pt; |
| 161 | 161 | $this->_Line_Height = $this->_Get_Height_Chars($pt); |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 167 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 166 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 167 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 168 | 168 | /** |
| 169 | 169 | * protected Print dot line |
| 170 | 170 | * |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15) |
| 181 | 181 | { |
| 182 | - // phpcs:enable |
|
| 182 | + // phpcs:enable |
|
| 183 | 183 | $pdf->SetLineWidth($epaisseur); |
| 184 | 184 | $length = abs($x1 - $x2); |
| 185 | 185 | $hauteur = abs($y1 - $y2); |
@@ -210,8 +210,8 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 214 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 213 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 214 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 215 | 215 | /** |
| 216 | 216 | * protected Function realisant une croix aux 4 coins des cartes |
| 217 | 217 | * |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | */ |
| 229 | 229 | protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4) |
| 230 | 230 | { |
| 231 | - // phpcs:enable |
|
| 231 | + // phpcs:enable |
|
| 232 | 232 | $pdf->SetDrawColor(192, 192, 192); |
| 233 | 233 | |
| 234 | 234 | $pdf->SetLineWidth($epaisseur); |
@@ -271,8 +271,8 @@ discard block |
||
| 271 | 271 | return $value; |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 275 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 274 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 275 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 276 | 276 | /** |
| 277 | 277 | * protected Give the height for a char size given. |
| 278 | 278 | * |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | protected function _Get_Height_Chars($pt) |
| 283 | 283 | { |
| 284 | - // phpcs:enable |
|
| 284 | + // phpcs:enable |
|
| 285 | 285 | // Array for link between height of characters and space between lines |
| 286 | 286 | $_Table_Hauteur_Chars = array(6 => 2, 7 => 2.5, 8 => 3, 9 => 3.5, 10 => 4, 11 => 6, 12 => 7, 13 => 8, 14 => 9, 15 => 10); |
| 287 | 287 | if (in_array($pt, array_keys($_Table_Hauteur_Chars))) { |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 295 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 294 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 295 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 296 | 296 | /** |
| 297 | 297 | * protected Set format |
| 298 | 298 | * |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | protected function _Set_Format(&$pdf, $format) |
| 304 | 304 | { |
| 305 | - // phpcs:enable |
|
| 305 | + // phpcs:enable |
|
| 306 | 306 | $this->_Metric = $format['metric']; |
| 307 | 307 | $this->_Avery_Name = $format['name']; |
| 308 | 308 | $this->_Avery_Code = empty($format['code']) ? '' : $format['code']; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 71 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 72 | 72 | /** |
| 73 | 73 | * Load array this->attributes with list of fields per object that need an alternate translation. The object and field must be managed with |
| 74 | 74 | * the widgetForTranslation() method. |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function fetch_name_extralanguages($elementtype, $forceload = false) |
| 83 | 83 | { |
| 84 | - // phpcs:enable |
|
| 84 | + // phpcs:enable |
|
| 85 | 85 | global $conf; |
| 86 | 86 | |
| 87 | 87 | if (empty($elementtype)) { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | |
| 225 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 225 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 226 | 226 | /** |
| 227 | 227 | * Write content of a SendSms request into a dump file (mode = all) |
| 228 | 228 | * Used for debugging. |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | public function dump_sms() |
| 233 | 233 | { |
| 234 | - // phpcs:enable |
|
| 234 | + // phpcs:enable |
|
| 235 | 235 | global $conf, $dolibarr_main_data_root; |
| 236 | 236 | |
| 237 | 237 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 255 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 256 | 256 | /** |
| 257 | 257 | * Write content of a SendSms result into a dump file (mode = all) |
| 258 | 258 | * Used for debugging. |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | */ |
| 263 | 263 | public function dump_sms_result($result) |
| 264 | 264 | { |
| 265 | - // phpcs:enable |
|
| 265 | + // phpcs:enable |
|
| 266 | 266 | global $dolibarr_main_data_root; |
| 267 | 267 | |
| 268 | 268 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
@@ -150,10 +150,10 @@ discard block |
||
| 150 | 150 | if (!getDolGlobalString('MAIN_DISABLE_ALL_SMS')) { |
| 151 | 151 | // Action according to the chose sending method |
| 152 | 152 | if (getDolGlobalString('MAIN_SMS_SENDMODE')) { |
| 153 | - $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module' |
|
| 154 | - $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module' |
|
| 153 | + $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module' |
|
| 154 | + $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module' |
|
| 155 | 155 | if ($classmoduleofsender == 'ovh') { |
| 156 | - $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility |
|
| 156 | + $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | $tmp = explode('@', $classmoduleofsender); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | // Send sms method not correctly defined |
| 210 | 210 | // -------------------------------------- |
| 211 | 211 | $this->error = 'Bad value for MAIN_SMS_SENDMODE constant'; |
| 212 | - $res = false; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 212 | + $res = false; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 213 | 213 | } |
| 214 | 214 | } else { |
| 215 | 215 | $this->error = 'No sms sent. Feature is disabled by option MAIN_DISABLE_ALL_SMS'; |