Passed
Branch develop (fc1365)
by Laurent
84:32
created
htdocs/societe/checkvat/checkVatPopup.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,10 @@
 block discarded – undo
21 21
  *		\brief      Popup screen to validate VAT
22 22
  */
23 23
 
24
-if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');		// Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
24
+if (! defined('NOTOKENRENEWAL')) {
25
+	define('NOTOKENRENEWAL', '1');
26
+}
27
+// Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
25 28
 
26 29
 require "../../main.inc.php";
27 30
 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/class/knowledgerecord.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -820,7 +820,9 @@
 block discarded – undo
820 820
 		}
821 821
 
822 822
 		$statusType = 'status'.$status;
823
-		if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
823
+		if ($status == self::STATUS_VALIDATED) {
824
+			$statusType = 'status4';
825
+		}
824 826
 		if ($status == self::STATUS_CANCELED) {
825 827
 			$statusType = 'status6';
826 828
 		}
Please login to merge, or discard this patch.
htdocs/website/index.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@  discard block
 block discarded – undo
26 26
 define('NOSTYLECHECK', 1);
27 27
 define('USEDOLIBARREDITOR', 1);
28 28
 define('FORCE_CKEDITOR', 1); // We need CKEditor, even if module is off.
29
-if (!defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1);
29
+if (!defined('DISABLE_JS_GRAHP')) {
30
+	define('DISABLE_JS_GRAPH', 1);
31
+}
30 32
 
31 33
 //header('X-XSS-Protection:0');	// Disable XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated.
32 34
 
@@ -592,7 +594,9 @@  discard block
 block discarded – undo
592 594
 		$arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml'));
593 595
 		foreach ($arrayotherlang as $key => $val) {
594 596
 			// It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,'
595
-			if (empty(trim($val))) continue;
597
+			if (empty(trim($val))) {
598
+				continue;
599
+			}
596 600
 			$arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only
597 601
 		}
598 602
 
@@ -1336,7 +1340,9 @@  discard block
 block discarded – undo
1336 1340
 				$arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml'));
1337 1341
 				foreach ($arrayotherlang as $key => $val) {
1338 1342
 					// It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,'
1339
-					if (empty(trim($val))) continue;
1343
+					if (empty(trim($val))) {
1344
+						continue;
1345
+					}
1340 1346
 					$arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only
1341 1347
 				}
1342 1348
 
@@ -1793,7 +1799,9 @@  discard block
 block discarded – undo
1793 1799
 					// Under certain conditions $sublang can be an empty string
1794 1800
 					// ($object->otherlang with empty string or with string like this 'en,,sv')
1795 1801
 					// if is the case we try to re-delete the main alias file. Avoid it.
1796
-					if (empty(trim($sublang))) continue;
1802
+					if (empty(trim($sublang))) {
1803
+						continue;
1804
+					}
1797 1805
 					$fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename;
1798 1806
 					dol_delete_file($fileoldaliassub);
1799 1807
 				}
@@ -1816,7 +1824,9 @@  discard block
 block discarded – undo
1816 1824
 							// Under certain conditions $ sublang can be an empty string
1817 1825
 							// ($object->otherlang with empty string or with string like this 'en,,sv')
1818 1826
 							// if is the case we try to re-delete the main alias file. Avoid it.
1819
-							if (empty(trim($sublang))) continue;
1827
+							if (empty(trim($sublang))) {
1828
+								continue;
1829
+							}
1820 1830
 							$fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename;
1821 1831
 							dol_delete_file($fileoldaliassub);
1822 1832
 						}
@@ -2903,7 +2913,9 @@  discard block
 block discarded – undo
2903 2913
 							$onlylang[$website->lang] = $website->lang.' ('.$langs->trans("Default").')';
2904 2914
 						}
2905 2915
 						foreach (explode(',', $website->otherlang) as $langkey) {
2906
-							if (empty(trim($langkey))) continue;
2916
+							if (empty(trim($langkey))) {
2917
+								continue;
2918
+							}
2907 2919
 							$onlylang[$langkey] = $langkey;
2908 2920
 						}
2909 2921
 						$textifempty = $langs->trans("Default");
Please login to merge, or discard this patch.
htdocs/contrat/card.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1984,9 +1984,12 @@
 block discarded – undo
1984 1984
 
1985 1985
 				$parameters = array();
1986 1986
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1987
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1988
-				if (empty($reshook))
1989
-					$object->formAddObjectLine(1, $mysoc, $soc);
1987
+				if ($reshook < 0) {
1988
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1989
+				}
1990
+				if (empty($reshook)) {
1991
+									$object->formAddObjectLine(1, $mysoc, $soc);
1992
+				}
1990 1993
 			}
1991 1994
 
1992 1995
 			print '</table>';
Please login to merge, or discard this patch.
htdocs/compta/paiement/rapport.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@
 block discarded – undo
118 118
 
119 119
 if ($year) {
120 120
 	if (is_dir($dir.'/'.$year)) {
121
-		if (!empty($year_dirs)) print '<br>';
121
+		if (!empty($year_dirs)) {
122
+			print '<br>';
123
+		}
122 124
 		print '<br>';
123 125
 		print '<table width="100%" class="noborder">';
124 126
 		print '<tr class="liste_titre">';
Please login to merge, or discard this patch.
htdocs/compta/facture/card-rec.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1623,9 +1623,13 @@
 block discarded – undo
1623 1623
 
1624 1624
 				$parameters = array();
1625 1625
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1626
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1627
-				if (empty($reshook))
1628
-					$object->formAddObjectLine(0, $mysoc, $object->thirdparty); // No date selector for template invoice
1626
+				if ($reshook < 0) {
1627
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1628
+				}
1629
+				if (empty($reshook)) {
1630
+									$object->formAddObjectLine(0, $mysoc, $object->thirdparty);
1631
+				}
1632
+				// No date selector for template invoice
1629 1633
 			}
1630 1634
 		}
1631 1635
 
Please login to merge, or discard this patch.
htdocs/supplier_proposal/card.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1776,9 +1776,12 @@
 block discarded – undo
1776 1776
 
1777 1777
 			$parameters = array();
1778 1778
 			$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1779
-			if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1780
-			if (empty($reshook))
1781
-				$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1779
+			if ($reshook < 0) {
1780
+				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1781
+			}
1782
+			if (empty($reshook)) {
1783
+							$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1784
+			}
1782 1785
 		}
1783 1786
 	}
1784 1787
 
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_card.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -598,9 +598,12 @@
 block discarded – undo
598 598
 
599 599
 				$parameters = array();
600 600
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
601
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
602
-				if (empty($reshook))
603
-					$object->formAddObjectLine(1, $mysoc, $soc);
601
+				if ($reshook < 0) {
602
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
603
+				}
604
+				if (empty($reshook)) {
605
+									$object->formAddObjectLine(1, $mysoc, $soc);
606
+				}
604 607
 			}
605 608
 		}
606 609
 
Please login to merge, or discard this patch.
htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1423,7 +1423,9 @@
 block discarded – undo
1423 1423
 		global $conf, $langs, $hookmanager;
1424 1424
 
1425 1425
 		$ltrdirection = 'L';
1426
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1426
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1427
+			$ltrdirection = 'R';
1428
+		}
1427 1429
 
1428 1430
 		// Load traductions files required by page
1429 1431
 		$outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies"));
Please login to merge, or discard this patch.