Completed
Branch develop (cb0ab5)
by
unknown
22:12
created
test/phpunit/AccountingAccountTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *      \remarks    To run this script as CLI:  phpunit filename.php
25 25
  */
26 26
 
27
-global $conf,$user,$langs,$db;
27
+global $conf, $user, $langs, $db;
28 28
 //define('TEST_DB_FORCE_TYPE','mysql');	// This is to force using mysql driver
29 29
 //require_once 'PHPUnit/Autoload.php';
30 30
 require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public static function setUpBeforeClass(): void
58 58
 	{
59
-		global $conf,$user,$langs,$db;
59
+		global $conf, $user, $langs, $db;
60 60
 		$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
61 61
 
62 62
 		if (!isModEnabled('accounting')) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function testAccountingAccountCreate()
77 77
 	{
78
-		global $conf,$user,$langs,$db;
78
+		global $conf, $user, $langs, $db;
79 79
 		$conf = $this->savconf;
80 80
 		$user = $this->savuser;
81 81
 		$langs = $this->savlangs;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function testAccountingAccountFetch($id)
111 111
 	{
112
-		global $conf,$user,$langs,$db;
112
+		global $conf, $user, $langs, $db;
113 113
 		$conf = $this->savconf;
114 114
 		$user = $this->savuser;
115 115
 		$langs = $this->savlangs;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function testAccountingAccountUpdate($localobject)
137 137
 	{
138
-		global $conf,$user,$langs,$db;
138
+		global $conf, $user, $langs, $db;
139 139
 		$conf = $this->savconf;
140 140
 		$user = $this->savuser;
141 141
 		$langs = $this->savlangs;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	 */
162 162
 	public function testAccountingAccountDelete($id)
163 163
 	{
164
-		global $conf,$user,$langs,$db;
164
+		global $conf, $user, $langs, $db;
165 165
 		$conf = $this->savconf;
166 166
 		$user = $this->savuser;
167 167
 		$langs = $this->savlangs;
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 */
188 188
 	public function testGetCurrentPeriodOfFiscalYear()
189 189
 	{
190
-		global $conf,$user,$langs,$db;
190
+		global $conf, $user, $langs, $db;
191 191
 		$conf = $this->savconf;
192 192
 		$user = $this->savuser;
193 193
 		$langs = $this->savlangs;
Please login to merge, or discard this patch.
htdocs/admin/defaultvalues.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -341,11 +341,11 @@  discard block
 block discarded – undo
341 341
 // Limit to superadmin
342 342
 if (isModEnabled('multicompany') && !$user->entity) {
343 343
 	print '<td>';
344
-	print '<input type="text" class="flat" size="1" disabled name="entity" value="' . $conf->entity . '">'; // We see environment, but to change it we must switch on other entity
344
+	print '<input type="text" class="flat" size="1" disabled name="entity" value="'.$conf->entity.'">'; // We see environment, but to change it we must switch on other entity
345 345
 	print '</td>';
346 346
 } else {
347 347
 	print '<td class="center">';
348
-	print '<input type="hidden" name="entity" value="' . $conf->entity . '">';
348
+	print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
349 349
 	print '</td>';
350 350
 }
351 351
 print '<td class="center">';
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 print '</td>'."\n";
358 358
 print '</tr>'."\n";
359 359
 
360
-$result = $object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type' => $mode, 't.entity' => array($user->entity,$conf->entity)));
360
+$result = $object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type' => $mode, 't.entity' => array($user->entity, $conf->entity)));
361 361
 
362 362
 if (!is_array($result) && $result < 0) {
363 363
 	setEventMessages($object->error, $object->errors, 'errors');
Please login to merge, or discard this patch.
htdocs/core/class/diasporahandler.class.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@
 block discarded – undo
40 40
 	public $error = '';
41 41
 
42 42
 	/**
43
-	* @var array<string,string> Authentication parameters, including cookie name and value
44
-	*/
43
+	 * @var array<string,string> Authentication parameters, including cookie name and value
44
+	 */
45 45
 	private $params = [];
46 46
 
47 47
 	/**
48
-	* Check if the provided cookie in params is valid.
49
-	* @return bool True if a valid cookie is found in params, false otherwise.
50
-	*/
48
+	 * Check if the provided cookie in params is valid.
49
+	 * @return bool True if a valid cookie is found in params, false otherwise.
50
+	 */
51 51
 	private function isCookieValid()
52 52
 	{
53 53
 		return !empty($this->getCookieFromParams());
Please login to merge, or discard this patch.
htdocs/core/class/extrafields.class.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -1172,7 +1172,7 @@  discard block
 block discarded – undo
1172 1172
 					'start' => isset($value['start']) ? $value['start'] : '',
1173 1173
 					'end'   => isset($value['end']) ? $value['end'] : ''
1174 1174
 				);
1175
-				$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">';
1175
+				$out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">';
1176 1176
 				$out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
1177 1177
 				$out .= '</div><div class="nowrap">';
1178 1178
 				$out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
 					'start' => isset($value['start']) ? $value['start'] : '',
1198 1198
 					'end'   => isset($value['end']) ? $value['end'] : ''
1199 1199
 				);
1200
-				$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">';
1200
+				$out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">';
1201 1201
 				$out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"), 'tzuserrel');
1202 1202
 				$out .= '</div><div class="nowrap">';
1203 1203
 				$out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"), 'tzuserrel');
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
 			} else {
1268 1268
 				$out = $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1, 1, 'width75 yesno');
1269 1269
 			}
1270
-			$out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">';	// A hidden field ending with "_boolean" that is always set to 1.
1270
+			$out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1.
1271 1271
 		} elseif ($type == 'price') {
1272 1272
 			if (!empty($value)) {		// $value in memory is a php numeric, we format it into user number format.
1273 1273
 				$value = price($value);
@@ -1367,8 +1367,8 @@  discard block
 block discarded – undo
1367 1367
 				// 7 : sort field (not used here but used into format for commobject)
1368 1368
 
1369 1369
 				// If there is a filter, we extract it by taking all content inside parenthesis.
1370
-				if (! empty($InfoFieldList[4])) {
1371
-					$pos = 0;	// $pos will be position of ending filter
1370
+				if (!empty($InfoFieldList[4])) {
1371
+					$pos = 0; // $pos will be position of ending filter
1372 1372
 					$parenthesisopen = 0;
1373 1373
 					while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) {
1374 1374
 						if (substr($InfoFieldList[4], $pos, 1) == '(') {
@@ -1455,9 +1455,9 @@  discard block
 block discarded – undo
1455 1455
 						if (strpos($InfoFieldList[4], 'extra.') !== false) {
1456 1456
 							$sql .= ' as main, '.$this->db->sanitize($this->db->prefix().$InfoFieldList[0]).'_extrafields as extra';
1457 1457
 							$sqlwhere .= " WHERE extra.fk_object = main.".$this->db->sanitize($InfoFieldList[2]);
1458
-							$sqlwhere .= " AND " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1458
+							$sqlwhere .= " AND ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1459 1459
 						} else {
1460
-							$sqlwhere .= " WHERE " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1460
+							$sqlwhere .= " WHERE ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1461 1461
 						}
1462 1462
 					} else {
1463 1463
 						$sqlwhere .= ' WHERE 1=1';
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
 				// 7 : sort field (not used here but used into format for commobject)
1593 1593
 
1594 1594
 				// If there is a filter, we extract it by taking all content inside parenthesis.
1595
-				if (! empty($InfoFieldList[4])) {
1595
+				if (!empty($InfoFieldList[4])) {
1596 1596
 					$pos = 0;
1597 1597
 					$parenthesisopen = 0;
1598 1598
 					while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) {
@@ -1728,9 +1728,9 @@  discard block
 block discarded – undo
1728 1728
 						if (strpos($InfoFieldList[4], 'extra.') !== false) {
1729 1729
 							$sql .= ' as main, '.$this->db->sanitize($this->db->prefix().$InfoFieldList[0]).'_extrafields as extra';
1730 1730
 							$sqlwhere .= " WHERE extra.fk_object = main.".$this->db->sanitize($InfoFieldList[2]);
1731
-							$sqlwhere .= " AND " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1731
+							$sqlwhere .= " AND ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1732 1732
 						} else {
1733
-							$sqlwhere .= " WHERE " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1733
+							$sqlwhere .= " WHERE ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1734 1734
 						}
1735 1735
 					} else {
1736 1736
 						$sqlwhere .= ' WHERE 1=1';
@@ -1845,7 +1845,7 @@  discard block
 block discarded – undo
1845 1845
 
1846 1846
 			$tmparray = explode(':', $param_list[0]);
1847 1847
 
1848
-			$element = $extrafieldsobjectkey;		// $extrafieldsobjectkey comes from $object->table_element but we need $object->element
1848
+			$element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element
1849 1849
 			if ($element == 'socpeople') {
1850 1850
 				$element = 'contact';
1851 1851
 			} elseif ($element == 'projet') {
@@ -1853,8 +1853,8 @@  discard block
 block discarded – undo
1853 1853
 			}
1854 1854
 
1855 1855
 			//$objectdesc = $param_list[0];				// Example: 'ObjectName:classPath:1:(status:=:1)'	Replaced by next line: this was propagated also a filter by ajax call that was blocked by some WAF
1856
-			$objectdesc = $tmparray[0];					// Example: 'ObjectName:classPath'					To not propagate any filter (selectForForms do ajax call and propagating SQL filter is blocked by some WAF). Also we should use the one into the definition in the ->fields of $elem if found.
1857
-			$objectfield = $element.':options_'.$key;	// Example: 'actioncomm:options_fff'				To be used in priority to know object linked with all its definition (including filters)
1856
+			$objectdesc = $tmparray[0]; // Example: 'ObjectName:classPath'					To not propagate any filter (selectForForms do ajax call and propagating SQL filter is blocked by some WAF). Also we should use the one into the definition in the ->fields of $elem if found.
1857
+			$objectfield = $element.':options_'.$key; // Example: 'actioncomm:options_fff'				To be used in priority to know object linked with all its definition (including filters)
1858 1858
 
1859 1859
 			$out = $form->selectForForms($objectdesc, $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, '', $objectfield);
1860 1860
 		} elseif (in_array($type, ['point', 'multipts', 'linestrg', 'polygon'])) {
@@ -1959,7 +1959,7 @@  discard block
 block discarded – undo
1959 1959
 
1960 1960
 		$label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
1961 1961
 		$type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
1962
-		$size = $this->attributes[$extrafieldsobjectkey]['size'][$key];			// Can be '255', '24,8'...
1962
+		$size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'...
1963 1963
 		$default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
1964 1964
 		$computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
1965 1965
 		$unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
@@ -1983,7 +1983,7 @@  discard block
 block discarded – undo
1983 1983
 		if ($type == 'date') {
1984 1984
 			$showsize = 10;
1985 1985
 			if ($value !== '') {
1986
-				$value = dol_print_date($value, 'day');	// For date without hour, date is always GMT for storage and output
1986
+				$value = dol_print_date($value, 'day'); // For date without hour, date is always GMT for storage and output
1987 1987
 			}
1988 1988
 		} elseif ($type == 'datetime') {
1989 1989
 			$showsize = 19;
@@ -2108,9 +2108,9 @@  discard block
 block discarded – undo
2108 2108
 								$translabel = $outputlangs->trans($obj->$field_toshow);
2109 2109
 
2110 2110
 								if ($translabel != $obj->$field_toshow) {
2111
-									$value .= dol_trunc($translabel, 24) . ' ';
2111
+									$value .= dol_trunc($translabel, 24).' ';
2112 2112
 								} else {
2113
-									$value .= $obj->$field_toshow . ' ';
2113
+									$value .= $obj->$field_toshow.' ';
2114 2114
 								}
2115 2115
 							}
2116 2116
 						}
@@ -2131,13 +2131,13 @@  discard block
 block discarded – undo
2131 2131
 					$toprint = array();
2132 2132
 					$obj = $this->db->fetch_object($resql);
2133 2133
 					if ($obj->rowid) {
2134
-						require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
2134
+						require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
2135 2135
 						$c = new Categorie($this->db);
2136 2136
 						$result = $c->fetch($obj->rowid);
2137 2137
 						if ($result > 0) {
2138 2138
 							$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
2139 2139
 							foreach ($ways as $way) {
2140
-								$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
2140
+								$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>';
2141 2141
 							}
2142 2142
 						}
2143 2143
 					}
@@ -2290,7 +2290,7 @@  discard block
 block discarded – undo
2290 2290
 			} else {
2291 2291
 				$value = '';
2292 2292
 			}
2293
-		} elseif (in_array($type, ['multipts','linestrg', 'polygon'])) {
2293
+		} elseif (in_array($type, ['multipts', 'linestrg', 'polygon'])) {
2294 2294
 			if (!empty($value)) {
2295 2295
 				require_once DOL_DOCUMENT_ROOT.'/core/class/dolgeophp.class.php';
2296 2296
 				$dolgeophp = new DolGeoPHP($this->db);
@@ -2450,12 +2450,12 @@  discard block
 block discarded – undo
2450 2450
 		if ($mode == 'create') {
2451 2451
 			// On create mode, force separator group to not be collapsible
2452 2452
 			$extrafield_collapse_display_value = 1;
2453
-			$expand_display = true;	// We force group to be shown expanded
2453
+			$expand_display = true; // We force group to be shown expanded
2454 2454
 			$disabledcookiewrite = 1; // We keep status of group unchanged into the cookie
2455 2455
 		}
2456 2456
 
2457 2457
 		$out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'">';
2458
-		$out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="' . $colspan . '"' : '').'>';
2458
+		$out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="'.$colspan.'"' : '').'>';
2459 2459
 		// Some js code will be injected here to manage the collapsing of extrafields
2460 2460
 		// Output the picto
2461 2461
 		$out .= '<span class="'.($extrafield_collapse_display_value ? 'cursorpointer ' : '').($extrafield_collapse_display_value == 0 ? 'fas fa-square opacitymedium' : 'far fa-'.(($expand_display ? 'minus' : 'plus').'-square')).'"></span>';
@@ -2537,7 +2537,7 @@  discard block
 block discarded – undo
2537 2537
 					continue;
2538 2538
 				}
2539 2539
 
2540
-				if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst', 'point', 'multipts', 'linestrg', 'polygon')))) {
2540
+				if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (!in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst', 'point', 'multipts', 'linestrg', 'polygon')))) {
2541 2541
 					//when unticking boolean field, it's not set in POST
2542 2542
 					continue;
2543 2543
 				}
@@ -2566,7 +2566,7 @@  discard block
 block discarded – undo
2566 2566
 						$onlykey === '@GETPOSTISSET'
2567 2567
 						&& in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst'))
2568 2568
 						&& in_array(abs($enabled), array(2, 5))
2569
-						&& ! GETPOSTISSET('options_' . $key) // Update hidden checkboxes and multiselect only if they are provided
2569
+						&& !GETPOSTISSET('options_'.$key) // Update hidden checkboxes and multiselect only if they are provided
2570 2570
 					)
2571 2571
 				) {
2572 2572
 					continue;
@@ -2703,17 +2703,17 @@  discard block
 block discarded – undo
2703 2703
 				}
2704 2704
 
2705 2705
 				if (in_array($key_type, array('date'))) {
2706
-					$dateparamname_start = $keyprefix . 'options_' . $key . $keysuffix . '_start';
2707
-					$dateparamname_end   = $keyprefix . 'options_' . $key . $keysuffix . '_end';
2706
+					$dateparamname_start = $keyprefix.'options_'.$key.$keysuffix.'_start';
2707
+					$dateparamname_end   = $keyprefix.'options_'.$key.$keysuffix.'_end';
2708 2708
 
2709
-					if (GETPOST($dateparamname_start . 'year') || GETPOST($dateparamname_end . 'year')) {
2709
+					if (GETPOST($dateparamname_start.'year') || GETPOST($dateparamname_end.'year')) {
2710 2710
 						$value_key = array();
2711 2711
 						// values provided as a component year, month, day, etc.
2712
-						if (GETPOST($dateparamname_start . 'year')) {
2713
-							$value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'));
2712
+						if (GETPOST($dateparamname_start.'year')) {
2713
+							$value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'));
2714 2714
 						}
2715
-						if (GETPOST($dateparamname_end . 'year')) {
2716
-							$value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'));
2715
+						if (GETPOST($dateparamname_end.'year')) {
2716
+							$value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'));
2717 2717
 						}
2718 2718
 					} elseif (GETPOST($keyprefix."options_".$key.$keysuffix."year")) {
2719 2719
 						// Clean parameters
@@ -2722,26 +2722,26 @@  discard block
 block discarded – undo
2722 2722
 						continue; // Value was not provided, we should not set it.
2723 2723
 					}
2724 2724
 				} elseif (in_array($key_type, array('datetime', 'datetimegmt'))) {
2725
-					$dateparamname_start = $keyprefix . 'options_' . $key . $keysuffix . '_start';
2726
-					$dateparamname_end   = $keyprefix . 'options_' . $key . $keysuffix . '_end';
2725
+					$dateparamname_start = $keyprefix.'options_'.$key.$keysuffix.'_start';
2726
+					$dateparamname_end   = $keyprefix.'options_'.$key.$keysuffix.'_end';
2727 2727
 
2728
-					if (GETPOST($dateparamname_start . 'year') || GETPOST($dateparamname_end . 'year')) {
2728
+					if (GETPOST($dateparamname_start.'year') || GETPOST($dateparamname_end.'year')) {
2729 2729
 						// values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc.
2730
-						$dateparamname_start_hour = GETPOSTINT($dateparamname_start . 'hour') != '-1' ? GETPOSTINT($dateparamname_start . 'hour') : '00';
2731
-						$dateparamname_start_min = GETPOSTINT($dateparamname_start . 'min') != '-1' ? GETPOSTINT($dateparamname_start . 'min') : '00';
2732
-						$dateparamname_start_sec = GETPOSTINT($dateparamname_start . 'sec') != '-1' ? GETPOSTINT($dateparamname_start . 'sec') : '00';
2733
-						$dateparamname_end_hour = GETPOSTINT($dateparamname_end . 'hour') != '-1' ? GETPOSTINT($dateparamname_end . 'hour') : '23';
2734
-						$dateparamname_end_min = GETPOSTINT($dateparamname_end . 'min') != '-1' ? GETPOSTINT($dateparamname_end . 'min') : '59';
2735
-						$dateparamname_end_sec = GETPOSTINT($dateparamname_end . 'sec') != '-1' ? GETPOSTINT($dateparamname_end . 'sec') : '59';
2730
+						$dateparamname_start_hour = GETPOSTINT($dateparamname_start.'hour') != '-1' ? GETPOSTINT($dateparamname_start.'hour') : '00';
2731
+						$dateparamname_start_min = GETPOSTINT($dateparamname_start.'min') != '-1' ? GETPOSTINT($dateparamname_start.'min') : '00';
2732
+						$dateparamname_start_sec = GETPOSTINT($dateparamname_start.'sec') != '-1' ? GETPOSTINT($dateparamname_start.'sec') : '00';
2733
+						$dateparamname_end_hour = GETPOSTINT($dateparamname_end.'hour') != '-1' ? GETPOSTINT($dateparamname_end.'hour') : '23';
2734
+						$dateparamname_end_min = GETPOSTINT($dateparamname_end.'min') != '-1' ? GETPOSTINT($dateparamname_end.'min') : '59';
2735
+						$dateparamname_end_sec = GETPOSTINT($dateparamname_end.'sec') != '-1' ? GETPOSTINT($dateparamname_end.'sec') : '59';
2736 2736
 						if ($key_type == 'datetimegmt') {
2737 2737
 							$value_key = array(
2738
-								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'gmt'),
2739
-								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'gmt')
2738
+								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'), 'gmt'),
2739
+								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'), 'gmt')
2740 2740
 							);
2741 2741
 						} else {
2742 2742
 							$value_key = array(
2743
-								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'tzuserrel'),
2744
-								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'tzuserrel')
2743
+								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'), 'tzuserrel'),
2744
+								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'), 'tzuserrel')
2745 2745
 							);
2746 2746
 						}
2747 2747
 					} elseif (GETPOST($keyprefix."options_".$key.$keysuffix."year")) {
@@ -2864,6 +2864,6 @@  discard block
 block discarded – undo
2864 2864
 		if ($type == 'sellist') {
2865 2865
 			return ($v == '0');
2866 2866
 		}
2867
-		return empty($v);  // Note empty('0') is also true, tested 7.0 up to 8.3.12
2867
+		return empty($v); // Note empty('0') is also true, tested 7.0 up to 8.3.12
2868 2868
 	}
2869 2869
 }
Please login to merge, or discard this patch.
htdocs/core/class/doleditor.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 			$posy = 0;
149 149
 			$lines = explode("\n", $content);
150 150
 			$nblines = count($lines);
151
-			for ($i = 0 ; $i < $nblines ; $i++) {
151
+			for ($i = 0; $i < $nblines; $i++) {
152 152
 				if (preg_match('/'.$poscursor['find'].'/', $lines[$i])) {
153 153
 					$posy = $i;
154 154
 					break;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 					define('REQUIRE_CKEDITOR', '1');
225 225
 				}
226 226
 
227
-				$skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa');		// default with ckeditor 4.6 : moono-lisa
227
+				$skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa
228 228
 
229 229
 				$pluginstodisable = 'elementspath,save,flash,div,anchor';
230 230
 				if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 					$pluginstodisable .= ',exportpdf';
241 241
 				}
242 242
 				if (getDolGlobalInt('MAIN_DISALLOW_URL_INTO_DESCRIPTIONS') == 2) {
243
-					$this->uselocalbrowser = 0;	// Can't use browser to navigate into files. Only links with "<img src=data:..." are allowed.
243
+					$this->uselocalbrowser = 0; // Can't use browser to navigate into files. Only links with "<img src=data:..." are allowed.
244 244
 				}
245 245
 				$scaytautostartup = '';
246 246
 				if (getDolGlobalString('FCKEDITOR_ENABLE_SCAYT_AUTOSTARTUP')) {
@@ -329,10 +329,10 @@  discard block
 block discarded – undo
329 329
                                filebrowserImageWindowWidth : \'900\',
330 330
                                filebrowserImageWindowHeight : \'500\'';
331 331
 				}
332
-				$out .= '	})'.$morejs;	// end CKEditor.replace
332
+				$out .= '	})'.$morejs; // end CKEditor.replace
333 333
 				// Show the CKEditor javascript object once loaded is ready 'For debug)
334 334
 				//$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); ';
335
-				$out .= '});'."\n";	// end document.ready
335
+				$out .= '});'."\n"; // end document.ready
336 336
 				$out .= '</script>'."\n";
337 337
 			}
338 338
 		}
Please login to merge, or discard this patch.
htdocs/core/class/discount.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @var string|float
65 65
 	 * @deprecated
66 66
 	 */
67
-	public $amount_ht; 	// deprecated
67
+	public $amount_ht; // deprecated
68 68
 	/**
69 69
 	 * @var string|float
70 70
 	 * @deprecated
@@ -92,17 +92,17 @@  discard block
 block discarded – undo
92 92
 	 * @var string|float
93 93
 	 * @deprecated
94 94
 	 */
95
-	public $multicurrency_amount_ht;	// deprecated
95
+	public $multicurrency_amount_ht; // deprecated
96 96
 	/**
97 97
 	 * @var string|float
98 98
 	 * @deprecated
99 99
 	 */
100
-	public $multicurrency_amount_tva;	// deprecated
100
+	public $multicurrency_amount_tva; // deprecated
101 101
 	/**
102 102
 	 * @var string|float
103 103
 	 * @deprecated
104 104
 	 */
105
-	public $multicurrency_amount_ttc;	// deprecated
105
+	public $multicurrency_amount_ttc; // deprecated
106 106
 
107 107
 	/**
108 108
 	 * @var float
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
 		dol_syslog(get_class($this)."::delete Delete discount", LOG_DEBUG);
438 438
 
439
-		require_once DOL_DOCUMENT_ROOT. '/core/class/commoninvoice.class.php';
439
+		require_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php';
440 440
 		$result = $this->db->query($sql);
441 441
 		if ($result) {
442 442
 			// If source of discount was a credit note or deposit, we change source statut.
@@ -666,12 +666,12 @@  discard block
 block discarded – undo
666 666
 			$sql = "SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount";
667 667
 			$sql .= " FROM ".$this->db->prefix()."societe_remise_except as rc, ".$this->db->prefix()."facture as f";
668 668
 			$sql .= " WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = ".((int) $invoice->id);
669
-			$sql .= " AND f.type = ". (int) $invoice::TYPE_DEPOSIT;
669
+			$sql .= " AND f.type = ".(int) $invoice::TYPE_DEPOSIT;
670 670
 		} elseif ($invoice->element == 'invoice_supplier') {
671 671
 			$sql = "SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount";
672 672
 			$sql .= " FROM ".$this->db->prefix()."societe_remise_except as rc, ".$this->db->prefix()."facture_fourn as f";
673 673
 			$sql .= " WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = ".((int) $invoice->id);
674
-			$sql .= " AND f.type = ". (int) $invoice::TYPE_DEPOSIT;
674
+			$sql .= " AND f.type = ".(int) $invoice::TYPE_DEPOSIT;
675 675
 		} else {
676 676
 			$this->error = get_class($this)."::getSumDepositsUsed was called with a bad object as a first parameter";
677 677
 			dol_print_error($this->db, $this->error);
Please login to merge, or discard this patch.
htdocs/core/class/html.formmargin.class.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 		$marginInfo = $this->getMarginInfosArray($object, $force_price);
230 230
 
231
-		print '<!-- displayMarginInfos() - Show margin table -->' . "\n";
231
+		print '<!-- displayMarginInfos() - Show margin table -->'."\n";
232 232
 
233 233
 		$parameters = array('marginInfo' => &$marginInfo);
234 234
 		$reshook = $hookmanager->executeHooks('displayMarginInfos', $parameters, $object, $action);
@@ -237,10 +237,10 @@  discard block
 block discarded – undo
237 237
 		} elseif (empty($reshook)) {
238 238
 			$hidemargininfos = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW'] ?? ''); // Clean cookie
239 239
 
240
-			$buttonToShowHideMargin = '<span id="showMarginInfos" class="linkobject valignmiddle ' . (!empty($hidemargininfos) ? '' : 'hideobject') . '">';
240
+			$buttonToShowHideMargin = '<span id="showMarginInfos" class="linkobject valignmiddle '.(!empty($hidemargininfos) ? '' : 'hideobject').'">';
241 241
 			$buttonToShowHideMargin .= img_picto($langs->trans("ShowMarginInfos"), 'switch_off', '', 0, 0, 0, '', 'size15x');
242 242
 			$buttonToShowHideMargin .= '</span>';
243
-			$buttonToShowHideMargin .= '<span id="hideMarginInfos" class="linkobject valignmiddle ' . (!empty($hidemargininfos) ? 'hideobject' : '') . '">';
243
+			$buttonToShowHideMargin .= '<span id="hideMarginInfos" class="linkobject valignmiddle '.(!empty($hidemargininfos) ? 'hideobject' : '').'">';
244 244
 			$buttonToShowHideMargin .= img_picto($langs->trans("Hide"), 'switch_on_grey', '', 0, 0, 0, '', 'size15x opacitymedium');
245 245
 			$buttonToShowHideMargin .= '</span>';
246 246
 
@@ -256,64 +256,64 @@  discard block
 block discarded – undo
256 256
 
257 257
 			print '<table class="noborder margintable centpercent" id="margintable">';
258 258
 			print '<tr class="liste_titre">';
259
-			print '<td class="liste_titre">' . $langs->trans('Margins') . ' ' . $buttonToShowHideMargin . '</td>';
260
-			print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">' . $langs->trans('SellingPrice') . '</td>';
259
+			print '<td class="liste_titre">'.$langs->trans('Margins').' '.$buttonToShowHideMargin.'</td>';
260
+			print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">'.$langs->trans('SellingPrice').'</td>';
261 261
 			if (getDolGlobalString('MARGIN_TYPE') == "1") {
262
-				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">' . $langs->trans('BuyingPrice') . '</td>';
262
+				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">'.$langs->trans('BuyingPrice').'</td>';
263 263
 			} else {
264
-				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">' . $langs->trans('CostPrice') . '</td>';
264
+				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">'.$langs->trans('CostPrice').'</td>';
265 265
 			}
266
-			print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">' . $langs->trans('Margin') . '</td>';
266
+			print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">'.$langs->trans('Margin').'</td>';
267 267
 			if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
268
-				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">' . $langs->trans('MarginRate') . '</td>';
268
+				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">'.$langs->trans('MarginRate').'</td>';
269 269
 			}
270 270
 			if (getDolGlobalString('DISPLAY_MARK_RATES')) {
271
-				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">' . $langs->trans('MarkRate') . '</td>';
271
+				print '<td class="liste_titre right margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">'.$langs->trans('MarkRate').'</td>';
272 272
 			}
273 273
 			print '</tr>';
274 274
 
275 275
 			if (isModEnabled("product")) {
276 276
 				//if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) {
277 277
 				print '<tr class="oddeven margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">';
278
-				print '<td>' . $langs->trans('MarginOnProducts') . '</td>';
279
-				print '<td class="right">' . price($marginInfo['pv_products']) . '</td>';
280
-				print '<td class="right">' . price($marginInfo['pa_products']) . '</td>';
281
-				print '<td class="right">' . price($marginInfo['margin_on_products']) . '</td>';
278
+				print '<td>'.$langs->trans('MarginOnProducts').'</td>';
279
+				print '<td class="right">'.price($marginInfo['pv_products']).'</td>';
280
+				print '<td class="right">'.price($marginInfo['pa_products']).'</td>';
281
+				print '<td class="right">'.price($marginInfo['margin_on_products']).'</td>';
282 282
 				if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
283
-					print '<td class="right">' . (($marginInfo['margin_rate_products'] == '') ? '' : price($marginInfo['margin_rate_products'], 0, '', 0, 0, 2) . '%') . '</td>';
283
+					print '<td class="right">'.(($marginInfo['margin_rate_products'] == '') ? '' : price($marginInfo['margin_rate_products'], 0, '', 0, 0, 2).'%').'</td>';
284 284
 				}
285 285
 				if (getDolGlobalString('DISPLAY_MARK_RATES')) {
286
-					print '<td class="right">' . (($marginInfo['mark_rate_products'] == '') ? '' : price($marginInfo['mark_rate_products'], 0, '', 0, 0, 2) . '%') . '</td>';
286
+					print '<td class="right">'.(($marginInfo['mark_rate_products'] == '') ? '' : price($marginInfo['mark_rate_products'], 0, '', 0, 0, 2).'%').'</td>';
287 287
 				}
288 288
 				print '</tr>';
289 289
 			}
290 290
 
291 291
 			if (isModEnabled("service")) {
292 292
 				print '<tr class="oddeven margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">';
293
-				print '<td>' . $langs->trans('MarginOnServices') . '</td>';
294
-				print '<td class="right">' . price($marginInfo['pv_services']) . '</td>';
295
-				print '<td class="right">' . price($marginInfo['pa_services']) . '</td>';
296
-				print '<td class="right">' . price($marginInfo['margin_on_services']) . '</td>';
293
+				print '<td>'.$langs->trans('MarginOnServices').'</td>';
294
+				print '<td class="right">'.price($marginInfo['pv_services']).'</td>';
295
+				print '<td class="right">'.price($marginInfo['pa_services']).'</td>';
296
+				print '<td class="right">'.price($marginInfo['margin_on_services']).'</td>';
297 297
 				if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
298
-					print '<td class="right">' . (($marginInfo['margin_rate_services'] == '') ? '' : price($marginInfo['margin_rate_services'], 0, '', 0, 0, 2) . '%') . '</td>';
298
+					print '<td class="right">'.(($marginInfo['margin_rate_services'] == '') ? '' : price($marginInfo['margin_rate_services'], 0, '', 0, 0, 2).'%').'</td>';
299 299
 				}
300 300
 				if (getDolGlobalString('DISPLAY_MARK_RATES')) {
301
-					print '<td class="right">' . (($marginInfo['mark_rate_services'] == '') ? '' : price($marginInfo['mark_rate_services'], 0, '', 0, 0, 2) . '%') . '</td>';
301
+					print '<td class="right">'.(($marginInfo['mark_rate_services'] == '') ? '' : price($marginInfo['mark_rate_services'], 0, '', 0, 0, 2).'%').'</td>';
302 302
 				}
303 303
 				print '</tr>';
304 304
 			}
305 305
 
306 306
 			if (isModEnabled("product") && isModEnabled("service")) {
307 307
 				print '<tr class="liste_total margininfo'.(empty($_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ? '' : ' hideobject').'">';
308
-				print '<td>' . $langs->trans('TotalMargin') . '</td>';
309
-				print '<td class="right">' . price($marginInfo['pv_total']) . '</td>';
310
-				print '<td class="right">' . price($marginInfo['pa_total']) . '</td>';
311
-				print '<td class="right">' . price($marginInfo['total_margin']) . '</td>';
308
+				print '<td>'.$langs->trans('TotalMargin').'</td>';
309
+				print '<td class="right">'.price($marginInfo['pv_total']).'</td>';
310
+				print '<td class="right">'.price($marginInfo['pa_total']).'</td>';
311
+				print '<td class="right">'.price($marginInfo['total_margin']).'</td>';
312 312
 				if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
313
-					print '<td class="right">' . (($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, '', 0, 0, 2) . '%') . '</td>';
313
+					print '<td class="right">'.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, '', 0, 0, 2).'%').'</td>';
314 314
 				}
315 315
 				if (getDolGlobalString('DISPLAY_MARK_RATES')) {
316
-					print '<td class="right">' . (($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, '', 0, 0, 2) . '%') . '</td>';
316
+					print '<td class="right">'.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, '', 0, 0, 2).'%').'</td>';
317 317
 				}
318 318
 				print '</tr>';
319 319
 			}
Please login to merge, or discard this patch.
htdocs/core/class/html.formfile.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		$maxphptoshow = $maxfilesizearray['maxphptoshow'];
160 160
 		$maxphptoshowparam = $maxfilesizearray['maxphptoshowparam'];
161 161
 		if ($maxmin > 0) {
162
-			$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
162
+			$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
163 163
 		}
164 164
 		$out .= '<input class="flat minwidth400 maxwidth200onsmartphone" type="file"';
165 165
 		$out .= ((getDolGlobalString('MAIN_DISABLE_MULTIPLE_FILEUPLOAD') || $disablemulti) ? ' name="userfile"' : ' name="userfile[]" multiple');
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 
869 869
 			// Loop on each file found
870 870
 			if (is_array($file_list)) {
871
-				'@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string}> $file_list';  // phan limitations loose typing information with empty() tests, etc.  Force again.
871
+				'@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string}> $file_list'; // phan limitations loose typing information with empty() tests, etc.  Force again.
872 872
 				// Defined relative dir to DOL_DATA_ROOT
873 873
 				$relativedir = '';
874 874
 				if ($filedir) {
@@ -1139,7 +1139,7 @@  discard block
 block discarded – undo
1139 1139
 
1140 1140
 				$this->infofiles['nboffiles']++;
1141 1141
 				$this->infofiles['files'][] = $file['fullname'];
1142
-				$ext = (string) pathinfo($file['name'], PATHINFO_EXTENSION);  // pathinfo returns a string here (cast for static analysis)
1142
+				$ext = (string) pathinfo($file['name'], PATHINFO_EXTENSION); // pathinfo returns a string here (cast for static analysis)
1143 1143
 				if (!array_key_exists($ext, $this->infofiles['extensions'])) {
1144 1144
 					$this->infofiles['extensions'][$ext] = 1;
1145 1145
 				} else {
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 						$modulepart = basename(dirname($file['path']));
1422 1422
 					}
1423 1423
 					if (empty($relativepath)) {
1424
-						$relativepath = preg_replace('/\/(.+)/', '', $filepath) . '/';
1424
+						$relativepath = preg_replace('/\/(.+)/', '', $filepath).'/';
1425 1425
 					}
1426 1426
 
1427 1427
 					$editline = 0;
@@ -1699,7 +1699,7 @@  discard block
 block discarded – undo
1699 1699
 
1700 1700
 			if ($nboflines > 1 && is_object($object)) {
1701 1701
 				if (!empty($conf->use_javascript_ajax) && $permtoeditline) {
1702
-					$table_element_line = 'ecm_files';	// used by ajaxrow.tpl.php
1702
+					$table_element_line = 'ecm_files'; // used by ajaxrow.tpl.php
1703 1703
 					include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
1704 1704
 				}
1705 1705
 			}
Please login to merge, or discard this patch.
htdocs/core/class/html.formprojet.class.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,6 @@
 block discarded – undo
153 153
 	 * @param string 	$morecss 		More CSS
154 154
 	 * @param string 	$morefilter 	More filters (Must be a sql sanitized string)
155 155
 	 * @return int|string|array<array{key:int,value:string,ref:string,labelx:string,label:string,disabled:bool}>         HTML string or array of option or <0 if KO
156
-
157 156
 	 */
158 157
 	public function select_projects_list($socid = -1, $selected = 0, $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500', $morefilter = '')
159 158
 	{
Please login to merge, or discard this patch.