@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $this->withbodyreadonly = 0; |
123 | 123 | } |
124 | 124 | |
125 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
125 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
126 | 126 | /** |
127 | 127 | * Show the form to input an sms. |
128 | 128 | * |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function show_form($morecss = 'titlefield', $showform = 1) |
134 | 134 | { |
135 | - // phpcs:enable |
|
135 | + // phpcs:enable |
|
136 | 136 | global $conf, $langs, $form; |
137 | 137 | |
138 | 138 | if (!is_object($form)) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | |
56 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
56 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
57 | 57 | /** |
58 | 58 | * Show list of action status |
59 | 59 | * |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100') |
70 | 70 | { |
71 | - // phpcs:enable |
|
71 | + // phpcs:enable |
|
72 | 72 | global $langs, $conf; |
73 | 73 | |
74 | 74 | $listofstatus = array( |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | } |
366 | 366 | |
367 | 367 | |
368 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
368 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
369 | 369 | /** |
370 | 370 | * Output html select list of type of event |
371 | 371 | * |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | */ |
382 | 382 | public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300') |
383 | 383 | { |
384 | - // phpcs:enable |
|
384 | + // phpcs:enable |
|
385 | 385 | global $langs, $user, $form; |
386 | 386 | |
387 | 387 | if (!is_object($form)) { |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | return '=?' . $conf->file->character_set_client . '?B?' . base64_encode($stringtoencode) . '?='; |
1338 | 1338 | } |
1339 | 1339 | |
1340 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1340 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1341 | 1341 | /** |
1342 | 1342 | * Read a file on disk and return encoded content for emails (mode = 'mail') |
1343 | 1343 | * |
@@ -1346,7 +1346,7 @@ discard block |
||
1346 | 1346 | */ |
1347 | 1347 | private function _encode_file($sourcefile) |
1348 | 1348 | { |
1349 | - // phpcs:enable |
|
1349 | + // phpcs:enable |
|
1350 | 1350 | $newsourcefile = dol_osencode($sourcefile); |
1351 | 1351 | |
1352 | 1352 | if (is_readable($newsourcefile)) { |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | } |
1362 | 1362 | |
1363 | 1363 | |
1364 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1364 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1365 | 1365 | /** |
1366 | 1366 | * Write content of a SMTP request into a dump file (mode = all) |
1367 | 1367 | * Used for debugging. |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | */ |
1372 | 1372 | public function dump_mail() |
1373 | 1373 | { |
1374 | - // phpcs:enable |
|
1374 | + // phpcs:enable |
|
1375 | 1375 | global $dolibarr_main_data_root; |
1376 | 1376 | |
1377 | 1377 | if (@is_writable($dolibarr_main_data_root)) { // Avoid fatal error on fopen with open_basedir |
@@ -1402,7 +1402,7 @@ discard block |
||
1402 | 1402 | } |
1403 | 1403 | } |
1404 | 1404 | |
1405 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1405 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1406 | 1406 | /** |
1407 | 1407 | * Save content if mail is in error |
1408 | 1408 | * Used for debugging. |
@@ -1499,7 +1499,7 @@ discard block |
||
1499 | 1499 | } |
1500 | 1500 | |
1501 | 1501 | |
1502 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1502 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1503 | 1503 | /** |
1504 | 1504 | * Create SMTP headers (mode = 'mail') |
1505 | 1505 | * |
@@ -1507,7 +1507,7 @@ discard block |
||
1507 | 1507 | */ |
1508 | 1508 | public function write_smtpheaders() |
1509 | 1509 | { |
1510 | - // phpcs:enable |
|
1510 | + // phpcs:enable |
|
1511 | 1511 | $out = ""; |
1512 | 1512 | $host = dol_getprefix('email'); |
1513 | 1513 | |
@@ -1571,7 +1571,7 @@ discard block |
||
1571 | 1571 | } |
1572 | 1572 | |
1573 | 1573 | |
1574 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1574 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1575 | 1575 | /** |
1576 | 1576 | * Create header MIME (mode = 'mail') |
1577 | 1577 | * |
@@ -1581,7 +1581,7 @@ discard block |
||
1581 | 1581 | */ |
1582 | 1582 | public function write_mimeheaders($filename_list, $mimefilename_list) |
1583 | 1583 | { |
1584 | - // phpcs:enable |
|
1584 | + // phpcs:enable |
|
1585 | 1585 | $mimedone = 0; |
1586 | 1586 | $out = ""; |
1587 | 1587 | |
@@ -1601,7 +1601,7 @@ discard block |
||
1601 | 1601 | return $out; |
1602 | 1602 | } |
1603 | 1603 | |
1604 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1604 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1605 | 1605 | /** |
1606 | 1606 | * Return email content (mode = 'mail') |
1607 | 1607 | * |
@@ -1610,7 +1610,7 @@ discard block |
||
1610 | 1610 | */ |
1611 | 1611 | public function write_body($msgtext) |
1612 | 1612 | { |
1613 | - // phpcs:enable |
|
1613 | + // phpcs:enable |
|
1614 | 1614 | global $conf; |
1615 | 1615 | |
1616 | 1616 | $out = ''; |
@@ -1694,7 +1694,7 @@ discard block |
||
1694 | 1694 | return $out; |
1695 | 1695 | } |
1696 | 1696 | |
1697 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1697 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1698 | 1698 | /** |
1699 | 1699 | * Attach file to email (mode = 'mail') |
1700 | 1700 | * |
@@ -1706,7 +1706,7 @@ discard block |
||
1706 | 1706 | */ |
1707 | 1707 | private function write_files($filename_list, $mimetype_list, $mimefilename_list, $cidlist) |
1708 | 1708 | { |
1709 | - // phpcs:enable |
|
1709 | + // phpcs:enable |
|
1710 | 1710 | $out = ''; |
1711 | 1711 | |
1712 | 1712 | $filename_list_size = count($filename_list); |
@@ -1745,7 +1745,7 @@ discard block |
||
1745 | 1745 | } |
1746 | 1746 | |
1747 | 1747 | |
1748 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1748 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1749 | 1749 | /** |
1750 | 1750 | * Attach an image to email (mode = 'mail') |
1751 | 1751 | * |
@@ -1754,7 +1754,7 @@ discard block |
||
1754 | 1754 | */ |
1755 | 1755 | public function write_images($images_list) |
1756 | 1756 | { |
1757 | - // phpcs:enable |
|
1757 | + // phpcs:enable |
|
1758 | 1758 | $out = ''; |
1759 | 1759 | |
1760 | 1760 | if (is_array($images_list)) { |
@@ -1776,7 +1776,7 @@ discard block |
||
1776 | 1776 | } |
1777 | 1777 | |
1778 | 1778 | |
1779 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1779 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1780 | 1780 | /** |
1781 | 1781 | * Try to create a socket connection |
1782 | 1782 | * |
@@ -1786,7 +1786,7 @@ discard block |
||
1786 | 1786 | */ |
1787 | 1787 | public function check_server_port($host, $port) |
1788 | 1788 | { |
1789 | - // phpcs:enable |
|
1789 | + // phpcs:enable |
|
1790 | 1790 | global $conf; |
1791 | 1791 | |
1792 | 1792 | $_retVal = 0; |
@@ -1857,7 +1857,7 @@ discard block |
||
1857 | 1857 | return $_retVal; |
1858 | 1858 | } |
1859 | 1859 | |
1860 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1860 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1861 | 1861 | /** |
1862 | 1862 | * This function has been modified as provided by SirSir to allow multiline responses when |
1863 | 1863 | * using SMTP Extensions. |
@@ -1868,7 +1868,7 @@ discard block |
||
1868 | 1868 | */ |
1869 | 1869 | public function server_parse($socket, $response) |
1870 | 1870 | { |
1871 | - // phpcs:enable |
|
1871 | + // phpcs:enable |
|
1872 | 1872 | $_retVal = true; // Indicates if Object was created or not |
1873 | 1873 | $server_response = ''; |
1874 | 1874 |
@@ -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) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->db = $db; |
50 | 50 | } |
51 | 51 | |
52 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
52 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
53 | 53 | /** |
54 | 54 | * Return list of social contributions. |
55 | 55 | * Use mysoc->country_id or mysoc->country_code so they must be defined. |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300', $noerrorifempty = 0) |
67 | 67 | { |
68 | - // phpcs:enable |
|
68 | + // phpcs:enable |
|
69 | 69 | global $conf, $db, $langs, $user, $mysoc; |
70 | 70 | |
71 | 71 | if (empty($mysoc->country_id) && empty($mysoc->country_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)) { |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | |
527 | 527 | |
528 | 528 | |
529 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
529 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
530 | 530 | /** |
531 | 531 | * Triggered when opened tag is found |
532 | 532 | * |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | */ |
538 | 538 | public function feed_start_element($p, $element, $attrs) |
539 | 539 | { |
540 | - // phpcs:enable |
|
540 | + // phpcs:enable |
|
541 | 541 | $el = $element = strtolower($element); |
542 | 542 | $attrs = array_change_key_case($attrs, CASE_LOWER); |
543 | 543 | |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } |
616 | 616 | |
617 | 617 | |
618 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
618 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
619 | 619 | /** |
620 | 620 | * Triggered when CDATA is found |
621 | 621 | * |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | */ |
626 | 626 | public function feed_cdata($p, $text) |
627 | 627 | { |
628 | - // phpcs:enable |
|
628 | + // phpcs:enable |
|
629 | 629 | if ($this->_format == 'atom' and $this->incontent) { |
630 | 630 | $this->append_content($text); |
631 | 631 | } else { |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | } |
635 | 635 | } |
636 | 636 | |
637 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
637 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
638 | 638 | /** |
639 | 639 | * Triggered when closed tag is found |
640 | 640 | * |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | */ |
645 | 645 | public function feed_end_element($p, $el) |
646 | 646 | { |
647 | - // phpcs:enable |
|
647 | + // phpcs:enable |
|
648 | 648 | $el = strtolower($el); |
649 | 649 | |
650 | 650 | if ($el == 'item' or $el == 'entry') { |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | return $str1; |
694 | 694 | } |
695 | 695 | |
696 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
696 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
697 | 697 | /** |
698 | 698 | * Enter description here ... |
699 | 699 | * |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | */ |
703 | 703 | public function append_content($text) |
704 | 704 | { |
705 | - // phpcs:enable |
|
705 | + // phpcs:enable |
|
706 | 706 | if (!empty($this->initem)) { |
707 | 707 | $this->concat($this->current_item[$this->incontent], $text); |
708 | 708 | } elseif (!empty($this->inchannel)) { |
@@ -59,107 +59,107 @@ |
||
59 | 59 | |
60 | 60 | class lessc_formatter_classic |
61 | 61 | { |
62 | - public $indentChar = " "; |
|
63 | - |
|
64 | - public $break = "\n"; |
|
65 | - public $open = " {"; |
|
66 | - public $close = "}"; |
|
67 | - public $selectorSeparator = ", "; |
|
68 | - public $assignSeparator = ":"; |
|
69 | - |
|
70 | - public $openSingle = " { "; |
|
71 | - public $closeSingle = " }"; |
|
72 | - |
|
73 | - public $disableSingle = false; |
|
74 | - public $breakSelectors = false; |
|
75 | - |
|
76 | - public $compressColors = false; |
|
77 | - public $indentLevel; |
|
78 | - |
|
79 | - public function __construct() |
|
80 | - { |
|
81 | - $this->indentLevel = 0; |
|
82 | - } |
|
83 | - |
|
84 | - public function indentStr($n = 0) |
|
85 | - { |
|
86 | - return str_repeat($this->indentChar, max($this->indentLevel + $n, 0)); |
|
87 | - } |
|
88 | - |
|
89 | - public function property($name, $value) |
|
90 | - { |
|
91 | - return $name.$this->assignSeparator.$value.";"; |
|
92 | - } |
|
93 | - |
|
94 | - protected function isEmpty($block) |
|
95 | - { |
|
96 | - if (empty($block->lines)) { |
|
97 | - foreach ($block->children as $child) { |
|
98 | - if (!$this->isEmpty($child)) { |
|
99 | - return false; |
|
100 | - } |
|
101 | - } |
|
102 | - |
|
103 | - return true; |
|
104 | - } |
|
105 | - return false; |
|
106 | - } |
|
107 | - |
|
108 | - public function block($block) |
|
109 | - { |
|
110 | - if ($this->isEmpty($block)) { |
|
111 | - return; |
|
112 | - } |
|
113 | - |
|
114 | - $inner = $pre = $this->indentStr(); |
|
115 | - |
|
116 | - $isSingle = !$this->disableSingle && |
|
117 | - is_null($block->type) && count($block->lines) == 1; |
|
118 | - |
|
119 | - if (!empty($block->selectors)) { |
|
120 | - $this->indentLevel++; |
|
121 | - |
|
122 | - if ($this->breakSelectors) { |
|
123 | - $selectorSeparator = $this->selectorSeparator.$this->break.$pre; |
|
124 | - } else { |
|
125 | - $selectorSeparator = $this->selectorSeparator; |
|
126 | - } |
|
127 | - |
|
128 | - echo $pre. |
|
129 | - implode($selectorSeparator, $block->selectors); |
|
130 | - if ($isSingle) { |
|
131 | - echo $this->openSingle; |
|
132 | - $inner = ""; |
|
133 | - } else { |
|
134 | - echo $this->open.$this->break; |
|
135 | - $inner = $this->indentStr(); |
|
136 | - } |
|
137 | - } |
|
138 | - |
|
139 | - if (!empty($block->lines)) { |
|
140 | - $glue = $this->break.$inner; |
|
141 | - echo $inner.implode($glue, $block->lines); |
|
142 | - if (!$isSingle && !empty($block->children)) { |
|
143 | - echo $this->break; |
|
144 | - } |
|
145 | - } |
|
146 | - |
|
147 | - foreach ($block->children as $child) { |
|
148 | - $this->block($child); |
|
149 | - } |
|
150 | - |
|
151 | - if (!empty($block->selectors)) { |
|
152 | - if (!$isSingle && empty($block->children)) { |
|
153 | - echo $this->break; |
|
154 | - } |
|
155 | - |
|
156 | - if ($isSingle) { |
|
157 | - echo $this->closeSingle.$this->break; |
|
158 | - } else { |
|
159 | - echo $pre.$this->close.$this->break; |
|
160 | - } |
|
161 | - |
|
162 | - $this->indentLevel--; |
|
163 | - } |
|
164 | - } |
|
62 | + public $indentChar = " "; |
|
63 | + |
|
64 | + public $break = "\n"; |
|
65 | + public $open = " {"; |
|
66 | + public $close = "}"; |
|
67 | + public $selectorSeparator = ", "; |
|
68 | + public $assignSeparator = ":"; |
|
69 | + |
|
70 | + public $openSingle = " { "; |
|
71 | + public $closeSingle = " }"; |
|
72 | + |
|
73 | + public $disableSingle = false; |
|
74 | + public $breakSelectors = false; |
|
75 | + |
|
76 | + public $compressColors = false; |
|
77 | + public $indentLevel; |
|
78 | + |
|
79 | + public function __construct() |
|
80 | + { |
|
81 | + $this->indentLevel = 0; |
|
82 | + } |
|
83 | + |
|
84 | + public function indentStr($n = 0) |
|
85 | + { |
|
86 | + return str_repeat($this->indentChar, max($this->indentLevel + $n, 0)); |
|
87 | + } |
|
88 | + |
|
89 | + public function property($name, $value) |
|
90 | + { |
|
91 | + return $name.$this->assignSeparator.$value.";"; |
|
92 | + } |
|
93 | + |
|
94 | + protected function isEmpty($block) |
|
95 | + { |
|
96 | + if (empty($block->lines)) { |
|
97 | + foreach ($block->children as $child) { |
|
98 | + if (!$this->isEmpty($child)) { |
|
99 | + return false; |
|
100 | + } |
|
101 | + } |
|
102 | + |
|
103 | + return true; |
|
104 | + } |
|
105 | + return false; |
|
106 | + } |
|
107 | + |
|
108 | + public function block($block) |
|
109 | + { |
|
110 | + if ($this->isEmpty($block)) { |
|
111 | + return; |
|
112 | + } |
|
113 | + |
|
114 | + $inner = $pre = $this->indentStr(); |
|
115 | + |
|
116 | + $isSingle = !$this->disableSingle && |
|
117 | + is_null($block->type) && count($block->lines) == 1; |
|
118 | + |
|
119 | + if (!empty($block->selectors)) { |
|
120 | + $this->indentLevel++; |
|
121 | + |
|
122 | + if ($this->breakSelectors) { |
|
123 | + $selectorSeparator = $this->selectorSeparator.$this->break.$pre; |
|
124 | + } else { |
|
125 | + $selectorSeparator = $this->selectorSeparator; |
|
126 | + } |
|
127 | + |
|
128 | + echo $pre. |
|
129 | + implode($selectorSeparator, $block->selectors); |
|
130 | + if ($isSingle) { |
|
131 | + echo $this->openSingle; |
|
132 | + $inner = ""; |
|
133 | + } else { |
|
134 | + echo $this->open.$this->break; |
|
135 | + $inner = $this->indentStr(); |
|
136 | + } |
|
137 | + } |
|
138 | + |
|
139 | + if (!empty($block->lines)) { |
|
140 | + $glue = $this->break.$inner; |
|
141 | + echo $inner.implode($glue, $block->lines); |
|
142 | + if (!$isSingle && !empty($block->children)) { |
|
143 | + echo $this->break; |
|
144 | + } |
|
145 | + } |
|
146 | + |
|
147 | + foreach ($block->children as $child) { |
|
148 | + $this->block($child); |
|
149 | + } |
|
150 | + |
|
151 | + if (!empty($block->selectors)) { |
|
152 | + if (!$isSingle && empty($block->children)) { |
|
153 | + echo $this->break; |
|
154 | + } |
|
155 | + |
|
156 | + if ($isSingle) { |
|
157 | + echo $this->closeSingle.$this->break; |
|
158 | + } else { |
|
159 | + echo $pre.$this->close.$this->break; |
|
160 | + } |
|
161 | + |
|
162 | + $this->indentLevel--; |
|
163 | + } |
|
164 | + } |
|
165 | 165 | } |
@@ -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 |