Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/public/test/test_exec.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@
 block discarded – undo
66 66
 
67 67
 print "*** TEST READ OF /tmp/test.txt FILE<br>\n";
68 68
 
69
-$out='';
70
-$ret=0;
69
+$out = '';
70
+$ret = 0;
71 71
 
72 72
 $file = '/tmp/test.txt';
73
-$f=fopen($file, 'r');
73
+$f = fopen($file, 'r');
74 74
 if ($f) {
75
-	$s=fread($f, 4096);
75
+	$s = fread($f, 4096);
76 76
 	print $s;
77 77
 	fclose($f);
78 78
 } else {
Please login to merge, or discard this patch.
htdocs/admin/agenda_other.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
 $action = GETPOST('action', 'aZ09');
38 38
 $value = GETPOST('value', 'alpha');
39
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
39
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
40 40
 
41 41
 $param = GETPOST('param', 'alpha');
42 42
 $cancel = GETPOST('cancel', 'alpha');
Please login to merge, or discard this patch.
htdocs/core/lib/tax.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 			while ($assoc = $db->fetch_array($resql)) {
802 802
 				$rate_key = $assoc['rate'];
803 803
 				if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) {
804
-					$rate_key .= ' (' . $assoc['vat_src_code'] . ')';
804
+					$rate_key .= ' ('.$assoc['vat_src_code'].')';
805 805
 				}
806 806
 
807 807
 				// Code to avoid warnings when array entry not defined
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
 			while ($assoc = $db->fetch_array($resql)) {
987 987
 				$rate_key = $assoc['rate'];
988 988
 				if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) {
989
-					$rate_key .= ' (' . $assoc['vat_src_code'] . ')';
989
+					$rate_key .= ' ('.$assoc['vat_src_code'].')';
990 990
 				}
991 991
 
992 992
 				// Code to avoid warnings when array entry not defined
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
 				while ($assoc = $db->fetch_array($resql)) {
1114 1114
 					$rate_key = $assoc['rate'];
1115 1115
 					if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) {
1116
-						$rate_key .= ' (' . $assoc['vat_src_code'] . ')';
1116
+						$rate_key .= ' ('.$assoc['vat_src_code'].')';
1117 1117
 					}
1118 1118
 
1119 1119
 					// Code to avoid warnings when array entry not defined
Please login to merge, or discard this patch.
htdocs/compta/tva/quadri_detail.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 		if (is_array($x_both[$rate]['coll']['detail'])) {
407 407
 			// VAT Rate
408 408
 			print "<tr>";
409
-			print '<td class="tax_rate" colspan="' . ($span+1) . '">';
410
-			print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
409
+			print '<td class="tax_rate" colspan="'.($span + 1).'">';
410
+			print $langs->trans('Rate').' : '.vatrate($rate).'%';
411 411
 			print ' - <a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=customer';
412 412
 			if ($invoice_type != 'customer' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
413 413
 				print '&amp;vat_rate_show='.urlencode($rate);
414 414
 			}
415
-			print '&amp;date_startyear='.urlencode($date_start_year).'&amp;date_startmonth='.urlencode($date_start_month).'&amp;date_startday='.urlencode($date_start_day).'&amp;date_endyear='.urlencode($date_end_year).'&amp;date_endmonth='.urlencode($date_end_month).'&amp;date_endday='.urlencode($date_end_day).'">' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>';
415
+			print '&amp;date_startyear='.urlencode($date_start_year).'&amp;date_startmonth='.urlencode($date_start_month).'&amp;date_startday='.urlencode($date_start_day).'&amp;date_endyear='.urlencode($date_end_year).'&amp;date_endmonth='.urlencode($date_end_month).'&amp;date_endday='.urlencode($date_end_day).'">'.img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>';
416 416
 			print '</td>';
417 417
 			print '</tr>'."\n";
418 418
 
@@ -430,22 +430,22 @@  discard block
 block discarded – undo
430 430
 				}
431 431
 
432 432
 				// Payment
433
-				$ratiopaymentinvoice=1;
433
+				$ratiopaymentinvoice = 1;
434 434
 				if ($modetax != 1) {
435 435
 					if (($type == 0 && $conf->global->TAX_MODE_SELL_PRODUCT == 'invoice')
436 436
 						|| ($type == 1 && $conf->global->TAX_MODE_SELL_SERVICE == 'invoice')) {
437 437
 					} else {
438 438
 						if (isset($fields['payment_amount']) && price2num($fields['ftotal_ttc'])) {
439
-							$ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
439
+							$ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']);
440 440
 						}
441 441
 					}
442 442
 				}
443 443
 
444 444
 				// Total collected
445
-				$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
445
+				$temp_ht = $fields['totalht'] * $ratiopaymentinvoice;
446 446
 
447 447
 				// VAT
448
-				$temp_vat=$fields['vat']*$ratiopaymentinvoice;
448
+				$temp_vat = $fields['vat'] * $ratiopaymentinvoice;
449 449
 
450 450
 				$subtot_coll_total_ht += $temp_ht;
451 451
 				$subtot_coll_vat      += $temp_vat;
@@ -485,13 +485,13 @@  discard block
 block discarded – undo
485 485
 					print '<tr class="oddeven">';
486 486
 
487 487
 					// Ref
488
-					print '<td class="nowrap left">' . $fields['link'] . '</td>';
488
+					print '<td class="nowrap left">'.$fields['link'].'</td>';
489 489
 
490 490
 					// Invoice date
491
-					print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
491
+					print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>';
492 492
 
493 493
 					// Payment date
494
-					if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>';
494
+					if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>';
495 495
 					else print '<td></td>';
496 496
 
497 497
 					// Company name
@@ -505,10 +505,10 @@  discard block
 block discarded – undo
505 505
 					if ($fields['pid']) {
506 506
 						$product_static->id = $fields['pid'];
507 507
 						$product_static->ref = $fields['pref'];
508
-						$product_static->type = $fields['dtype'];        // We force with the type of line to have type how line is registered
508
+						$product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered
509 509
 						print $product_static->getNomUrl(1);
510 510
 						if (dol_string_nohtmltag($fields['descr'])) {
511
-							print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
511
+							print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
512 512
 						}
513 513
 					} else {
514 514
 						if ($type) {
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 								$fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
526 526
 							}
527 527
 						}
528
-						print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
528
+						print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
529 529
 
530 530
 						// Show range
531 531
 						print_date_range($fields['ddate_start'], $fields['ddate_end']);
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 							}
564 564
 							print price(price2num($fields['payment_amount'], 'MT'));
565 565
 							if (isset($fields['payment_amount'])) {
566
-								print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)';
566
+								print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
567 567
 							}
568 568
 						}
569 569
 						print '</td>';
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 	}
617 617
 
618 618
 	// Blank line
619
-	print '<tr><td colspan="'.($span+2).'">&nbsp;</td></tr>';
619
+	print '<tr><td colspan="'.($span + 2).'">&nbsp;</td></tr>';
620 620
 
621 621
 	// Print table headers for this quadri - expenses
622 622
 	print '<tr class="liste_titre liste_titre_topborder">';
@@ -640,13 +640,13 @@  discard block
 block discarded – undo
640 640
 
641 641
 		if (is_array($x_both[$rate]['paye']['detail'])) {
642 642
 			print "<tr>";
643
-			print '<td class="tax_rate" colspan="' . ($span+1) . '">';
644
-			print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
643
+			print '<td class="tax_rate" colspan="'.($span + 1).'">';
644
+			print $langs->trans('Rate').' : '.vatrate($rate).'%';
645 645
 			print ' - <a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=supplier';
646 646
 			if ($invoice_type != 'supplier' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
647 647
 				print '&amp;vat_rate_show='.urlencode($rate);
648 648
 			}
649
-			print '&amp;date_startyear='.urlencode($date_start_year).'&amp;date_startmonth='.urlencode($date_start_month).'&amp;date_startday='.urlencode($date_start_day).'&amp;date_endyear='.urlencode($date_end_year).'&amp;date_endmonth='.urlencode($date_end_month).'&amp;date_endday='.urlencode($date_end_day).'">' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>';
649
+			print '&amp;date_startyear='.urlencode($date_start_year).'&amp;date_startmonth='.urlencode($date_start_month).'&amp;date_startday='.urlencode($date_start_day).'&amp;date_endyear='.urlencode($date_end_year).'&amp;date_endmonth='.urlencode($date_end_month).'&amp;date_endday='.urlencode($date_end_day).'">'.img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>';
650 650
 			print '</td>';
651 651
 			print '</tr>'."\n";
652 652
 
@@ -717,14 +717,14 @@  discard block
 block discarded – undo
717 717
 					print '<tr class="oddeven">';
718 718
 
719 719
 					// Ref
720
-					print '<td class="nowrap left">' . $fields['link'] . '</td>';
720
+					print '<td class="nowrap left">'.$fields['link'].'</td>';
721 721
 
722 722
 					// Invoice date
723
-					print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
723
+					print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>';
724 724
 
725 725
 					// Payment date
726 726
 					if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') {
727
-						print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>';
727
+						print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>';
728 728
 					} else {
729 729
 						print '<td></td>';
730 730
 					}
@@ -740,10 +740,10 @@  discard block
 block discarded – undo
740 740
 					if ($fields['pid']) {
741 741
 						$product_static->id = $fields['pid'];
742 742
 						$product_static->ref = $fields['pref'];
743
-						$product_static->type = $fields['dtype'];        // We force with the type of line to have type how line is registered
743
+						$product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered
744 744
 						print $product_static->getNomUrl(1);
745 745
 						if (dol_string_nohtmltag($fields['descr'])) {
746
-							print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
746
+							print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
747 747
 						}
748 748
 					} else {
749 749
 						if ($type) {
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 								$fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
761 761
 							}
762 762
 						}
763
-						print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
763
+						print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
764 764
 
765 765
 						// Show range
766 766
 						print_date_range($fields['ddate_start'], $fields['ddate_end']);
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
 							}
799 799
 							print price(price2num($fields['payment_amount'], 'MT'));
800 800
 							if (isset($fields['payment_amount'])) {
801
-								print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)';
801
+								print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
802 802
 							}
803 803
 						}
804 804
 						print '</td>';
Please login to merge, or discard this patch.
htdocs/product/reassort.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
 	}
160 160
 	$sql .= "(";
161 161
 	$sql .= " SELECT cp.fk_categorie, cp.fk_product";
162
-	$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_product as cp";
162
+	$sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cp";
163 163
 	$sql .= " WHERE cp.fk_product = p.rowid"; // Join for the needed table to filter by categ
164 164
 	if ($search_categ > 0) {
165
-		$sql .= " AND cp.fk_categorie = " . ((int) $search_categ);
165
+		$sql .= " AND cp.fk_categorie = ".((int) $search_categ);
166 166
 	}
167 167
 	$sql .= ")";
168 168
 }
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 }
211 211
 if ($search_stock_physique != '') {
212 212
 	//$natural_search_physique = natural_search('HAVING SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1);
213
-	$natural_search_physique = natural_search('SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1);
214
-	$natural_search_physique = " " . substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters
213
+	$natural_search_physique = natural_search('SUM('.$db->ifsql('s.reel IS NULL', '0', 's.reel').')', $search_stock_physique, 1, 1);
214
+	$natural_search_physique = " ".substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters
215 215
 	if (!empty($sql_having)) {
216 216
 		$sql_having .= " AND";
217 217
 	} else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 		$param .= "&sbarcode=".urlencode($sbarcode);
299 299
 	}
300 300
 	if ($search_stock_physique) {
301
-		$param .= '&search_stock_physique=' . urlencode($search_stock_physique);
301
+		$param .= '&search_stock_physique='.urlencode($search_stock_physique);
302 302
 	}
303 303
 
304 304
 	llxHeader("", $texte, $helpurl);
Please login to merge, or discard this patch.
htdocs/comm/mailing/cibles.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 		//print '<td class="liste_titre" align="center">&nbsp;</td>';
326 326
 		print '<div class="tagtd">&nbsp;</div>';
327 327
 		//print "</tr>\n";
328
-		print '</div>';	// End tr
328
+		print '</div>'; // End tr
329 329
 
330 330
 		clearstatcache();
331 331
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 		$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
448 448
 		print $hookmanager->resPrint;
449 449
 
450
-		print '</div>';	// End table
450
+		print '</div>'; // End table
451 451
 		print '</div>';
452 452
 
453 453
 		print '<br><br>';
Please login to merge, or discard this patch.
htdocs/product/stock/class/mouvementstock.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 				'skip_batch'       => &$skip_batch,
199 199
 				'id_product_batch' => &$id_product_batch
200 200
 			);
201
-			$reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action);    // Note that $action and $object may have been modified by some hooks
201
+			$reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
202 202
 
203 203
 			if ($reshook < 0) {
204 204
 				if (!empty($hookmanager->resPrint)) {
@@ -665,8 +665,8 @@  discard block
 block discarded – undo
665 665
 				$this->price = $obj->price;
666 666
 				$this->fk_user_author = $obj->fk_user_author;
667 667
 				$this->label = $obj->label;
668
-				$this->fk_origin = $obj->origin_id;		// For backward compatibility
669
-				$this->origintype = $obj->origin_type;	// For backward compatibility
668
+				$this->fk_origin = $obj->origin_id; // For backward compatibility
669
+				$this->origintype = $obj->origin_type; // For backward compatibility
670 670
 				$this->origin_id = $obj->origin_id;
671 671
 				$this->origin_type = $obj->origin_type;
672 672
 				$this->inventorycode = $obj->inventorycode;
@@ -894,8 +894,8 @@  discard block
 block discarded – undo
894 894
 			} else {					// product_batch record not found
895 895
 				$pdluo->fk_product_stock = $vfk_product_stock;
896 896
 				$pdluo->qty = $qty;
897
-				$pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby'];		// No more used. Now eatby date is store in table of lot, no more into prouct_batch table.
898
-				$pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby'];		// No more used. Now sellby date is store in table of lot, no more into prouct_batch table.
897
+				$pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table.
898
+				$pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table.
899 899
 				$pdluo->batch = $vbatchnumber;
900 900
 
901 901
 				$result = $pdluo->create($user, 1);
@@ -1205,8 +1205,8 @@  discard block
 block discarded – undo
1205 1205
 		$sql = "SELECT sum(pb.qty) as cpt";
1206 1206
 		$sql .= " FROM ".$this->db->prefix()."product_batch as pb";
1207 1207
 		$sql .= " INNER JOIN ".$this->db->prefix()."product_stock as ps ON ps.rowid = pb.fk_product_stock";
1208
-		$sql .= " WHERE ps.fk_product = " . ((int) $fk_product);
1209
-		$sql .= " AND pb.batch = '" . $this->db->escape($batch) . "'";
1208
+		$sql .= " WHERE ps.fk_product = ".((int) $fk_product);
1209
+		$sql .= " AND pb.batch = '".$this->db->escape($batch)."'";
1210 1210
 
1211 1211
 		$result = $this->db->query($sql);
1212 1212
 		if ($result) {
Please login to merge, or discard this patch.
htdocs/install/step5.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,8 +214,8 @@
 block discarded – undo
214 214
 			$newuser->admin = 1;
215 215
 			$newuser->entity = 0;
216 216
 
217
-			$conf->global->USER_MAIL_REQUIRED = 0; 			// Force global option to be sure to create a new user with no email
218
-			$conf->global->USER_PASSWORD_GENERATED = '';	// To not use any rule for password validation
217
+			$conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email
218
+			$conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation
219 219
 
220 220
 			$result = $newuser->create($createuser, 1);
221 221
 			if ($result > 0) {
Please login to merge, or discard this patch.
htdocs/paypal/lib/paypal.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -503,7 +503,7 @@
 block discarded – undo
503 503
 	// Turning on or off the ssl target certificate
504 504
 	if ($ssl_verifypeer < 0) {
505 505
 		global $dolibarr_main_prod;
506
-		$ssl_verifypeer =  ($dolibarr_main_prod ? true : false);
506
+		$ssl_verifypeer = ($dolibarr_main_prod ? true : false);
507 507
 	}
508 508
 	if (!empty($conf->global->MAIN_CURL_DISABLE_VERIFYPEER)) {
509 509
 		$ssl_verifypeer = 0;
Please login to merge, or discard this patch.