Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/emailcollector/lib/emailcollector.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,10 +175,10 @@
 block discarded – undo
175 175
 	}
176 176
 
177 177
 	$i = 1;
178
-	$filepath = $path . $filename . '.' . $ext;
178
+	$filepath = $path.$filename.'.'.$ext;
179 179
 
180 180
 	while (file_exists($filepath)) {
181
-		$filepath = $path . $filename . '(' . $i . ').' . $ext;
181
+		$filepath = $path.$filename.'('.$i.').'.$ext;
182 182
 		$i++;
183 183
 	}
184 184
 	file_put_contents($filepath, $data);
Please login to merge, or discard this patch.
htdocs/admin/dolistore/class/dolistore.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -320,12 +320,12 @@
 block discarded – undo
320 320
 			//output template
321 321
 			$html .= '<tr class="app oddeven '.dol_escape_htmltag($compatible).'">';
322 322
 			$html .= '<td class="center" width="210"><div class="newAppParent">';
323
-			$html .= $newapp.$images;	// No dol_escape_htmltag, it is already escape html
323
+			$html .= $newapp.$images; // No dol_escape_htmltag, it is already escape html
324 324
 			$html .= '</div></td>';
325 325
 			$html .= '<td class="margeCote"><h2 class="appTitle">';
326 326
 			$html .= dol_escape_htmltag($product->name->language[$this->lang - 1]);
327 327
 			$html .= '<br><small>';
328
-			$html .= $version;			// No dol_escape_htmltag, it is already escape html
328
+			$html .= $version; // No dol_escape_htmltag, it is already escape html
329 329
 			$html .= '</small></h2>';
330 330
 			$html .= '<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).'</small><br><br>'.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).'</td>';
331 331
 			// do not load if display none
Please login to merge, or discard this patch.
htdocs/hrm/class/skilldet.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
 	/**
103 103
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
104 104
 	 */
105
-	public $fields=array(
105
+	public $fields = array(
106 106
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
107 107
 		'fk_skill' => array('type'=>'integer:Skill:/hrm/class/skill.class.php', 'label'=>'fk_skill', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>0,),
108 108
 		'rankorder' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>10, 'notnull'=>0, 'visible'=>2,),
Please login to merge, or discard this patch.
htdocs/core/lib/files.lib.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
 			if (isset($object->table_element)) {
1805 1805
 				$ecmfile->src_object_type = $object->table_element;
1806 1806
 			} else {
1807
-				dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.');
1807
+				dol_syslog('Error: object '.get_class($object).' has no table_element attribute.');
1808 1808
 				return -1;
1809 1809
 			}
1810 1810
 			if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
@@ -2004,9 +2004,9 @@  discard block
 block discarded – undo
2004 2004
 					// Skip directories (they would be added automatically)
2005 2005
 					if (!$file->isDir()) {
2006 2006
 						// Get real and relative path for current file
2007
-						$filePath = $file->getPath();				// the full path with filename using the $inputdir root.
2007
+						$filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2008 2008
 						$fileName = $file->getFilename();
2009
-						$fileFullRealPath = $file->getRealPath();	// the full path with name and transformed to use real path directory.
2009
+						$fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2010 2010
 
2011 2011
 						//$relativePath = substr($fileFullRealPath, strlen($rootPath) + 1);
2012 2012
 						$relativePath = substr(($filePath ? $filePath.'/' : '').$fileName, strlen($rootPath) + 1);
@@ -2212,9 +2212,9 @@  discard block
 block discarded – undo
2212 2212
 					// Skip directories (they would be added automatically)
2213 2213
 					if (!$file->isDir()) {
2214 2214
 						// Get real and relative path for current file
2215
-						$filePath = $file->getPath();				// the full path with filename using the $inputdir root.
2215
+						$filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2216 2216
 						$fileName = $file->getFilename();
2217
-						$fileFullRealPath = $file->getRealPath();	// the full path with name and transformed to use real path directory.
2217
+						$fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2218 2218
 
2219 2219
 						//$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($fileFullRealPath, strlen($inputdir) + 1);
2220 2220
 						$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr(($filePath ? $filePath.'/' : '').$fileName, strlen($inputdir) + 1);
Please login to merge, or discard this patch.
htdocs/product/traduction.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
 
133 133
 		foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet
134 134
 			if ($key == $current_lang) {
135
-				$object->label = GETPOST("libelle-" . $key);
136
-				$object->description = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
137
-				$object->other = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
135
+				$object->label = GETPOST("libelle-".$key);
136
+				$object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
137
+				$object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
138 138
 			} else {
139
-				$object->multilangs[$key]["label"] = GETPOST("libelle-" . $key);
140
-				$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
141
-				$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
139
+				$object->multilangs[$key]["label"] = GETPOST("libelle-".$key);
140
+				$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
141
+				$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
142 142
 			}
143 143
 		}
144 144
 
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 if (empty($reshook)) {
232 232
 	if ($action == '') {
233 233
 		if ($user->rights->produit->creer || $user->rights->service->creer) {
234
-			print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Add") . '</a>';
234
+			print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Add").'</a>';
235 235
 			if ($cnt_trans > 0) {
236
-				print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Modify") . '</a>';
236
+				print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>';
237 237
 			}
238 238
 		}
239 239
 	}
Please login to merge, or discard this patch.
htdocs/compta/tva/card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 			}
263 263
 		}
264 264
 		if (empty($error)) {
265
-			header("Location: card.php?id=" . $object->id);
265
+			header("Location: card.php?id=".$object->id);
266 266
 			exit;
267 267
 		}
268 268
 	}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	} else {
318 318
 		$result = $object->fetch($id);
319 319
 
320
-		$object->amount	= $amount;
320
+		$object->amount = $amount;
321 321
 
322 322
 		$result = $object->update($user);
323 323
 		if ($result <= 0) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 
481 481
 	// Auto create payment
482 482
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
483
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";
483
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_payment) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n";
484 484
 
485 485
 	print '<tr class="hide_if_no_auto_create_payment">';
486 486
 	print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
@@ -604,9 +604,9 @@  discard block
 block discarded – undo
604 604
 	print '</td></tr>';
605 605
 
606 606
 	if ($action == 'edit') {
607
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
607
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
608 608
 	} else {
609
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>';
609
+		print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
610 610
 	}
611 611
 
612 612
 	// Mode of payment
Please login to merge, or discard this patch.
htdocs/product/inventory/ajax/searchfrombarcode.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	$result = $db->query($sql);
79 79
 	if ($result) {
80 80
 		$nbline = $db->num_rows($result);
81
-		for ($i=0; $i < $nbline; $i++) {
81
+		for ($i = 0; $i < $nbline; $i++) {
82 82
 			$object = $db->fetch_object($result);
83 83
 			if (($mode == "barcode" && $barcode == $object->barcode) || ($mode == "lotserial" && $barcode == $object->batch)) {
84 84
 				$warehouse->fetch(0, $product["Warehouse"]);
@@ -88,22 +88,22 @@  discard block
 block discarded – undo
88 88
 					$fk_product = $object->fk_product;
89 89
 					$reelqty = $object->reel;
90 90
 
91
-					$objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty);
91
+					$objectreturn = array('fk_warehouse'=>$warehouseid, 'fk_product'=>$fk_product, 'reelqty'=>$reelqty);
92 92
 				}
93 93
 			}
94 94
 		}
95 95
 		if ($warehousefound < 1) {
96
-			$response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode);
96
+			$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>'No warehouse found for barcode'.$barcode);
97 97
 		} elseif ($warehousefound > 1) {
98
-			$response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found');
98
+			$response = array('status'=>'error', 'errorcode'=>'TooManyWarehouse', 'message'=>'Too many warehouse found');
99 99
 		} else {
100
-			$response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn);
100
+			$response = array('status'=>'success', 'message'=>'Warehouse found', 'object'=>$objectreturn);
101 101
 		}
102 102
 	} else {
103
-		$response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode");
103
+		$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>"No results found for barcode");
104 104
 	}
105 105
 } else {
106
-	$response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action");
106
+	$response = array('status'=>'error', 'errorcode'=>'ActionError', 'message'=>"Error on action");
107 107
 }
108 108
 
109 109
 if ($action == "addnewlineproduct") {
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
 		$result = $inventoryline->create($user);
124 124
 		if ($result > 0) {
125
-			$response = array('status'=>'success','message'=>'Success on creating line','id_line'=>$result);
125
+			$response = array('status'=>'success', 'message'=>'Success on creating line', 'id_line'=>$result);
126 126
 		} else {
127
-			$response = array('status'=>'error','errorcode'=>'ErrorCreation','message'=>"Error on line creation");
127
+			$response = array('status'=>'error', 'errorcode'=>'ErrorCreation', 'message'=>"Error on line creation");
128 128
 		}
129 129
 	} else {
130
-		$response = array('status'=>'error','errorcode'=>'NoIdForInventory','message'=>"No id for inventory");
130
+		$response = array('status'=>'error', 'errorcode'=>'NoIdForInventory', 'message'=>"No id for inventory");
131 131
 	}
132 132
 }
133 133
 
Please login to merge, or discard this patch.
htdocs/core/modules/DolibarrModules.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 		include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
636 636
 		include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
637 637
 
638
-		$content='';
638
+		$content = '';
639 639
 		$pathoffile = $this->getDescLongReadmeFound();
640 640
 
641 641
 		if ($pathoffile) {     // Mostly for external modules
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 
1360 1360
 				$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
1361 1361
 				$sql .= " WHERE file = '".$this->db->escape($file)."'";
1362
-				$sql .= " AND entity = ".$conf->entity;		// Do not use getEntity here, we want to delete only in current company
1362
+				$sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company
1363 1363
 
1364 1364
 				dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG);
1365 1365
 				$resql = $this->db->query($sql);
@@ -1767,7 +1767,7 @@  discard block
 block discarded – undo
1767 1767
 
1768 1768
 				// If the module is active
1769 1769
 				foreach ($this->rights as $key => $value) {
1770
-					$r_id       = $this->rights[$key][0];	// permission id in llx_rights_def (not unique because primary key is couple id-entity)
1770
+					$r_id       = $this->rights[$key][0]; // permission id in llx_rights_def (not unique because primary key is couple id-entity)
1771 1771
 					$r_desc     = $this->rights[$key][1];
1772 1772
 					$r_type     = isset($this->rights[$key][2]) ? $this->rights[$key][2] : '';
1773 1773
 					$r_def      = empty($this->rights[$key][3]) ? 0 : $this->rights[$key][3];
@@ -2345,9 +2345,9 @@  discard block
 block discarded – undo
2345 2345
 		}
2346 2346
 
2347 2347
 		if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
2348
-			$versionTitle =  $langs->trans("Version").' '.$this->getVersion(1);
2348
+			$versionTitle = $langs->trans("Version").' '.$this->getVersion(1);
2349 2349
 			if ($this->needUpdate) {
2350
-				$versionTitle.= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion;
2350
+				$versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion;
2351 2351
 			}
2352 2352
 
2353 2353
 			print '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
@@ -2391,7 +2391,7 @@  discard block
 block discarded – undo
2391 2391
 	{
2392 2392
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
2393 2393
 		if (!empty($this->url_last_version)) {
2394
-			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2394
+			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2395 2395
 			if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) {
2396 2396
 				// Security warning :  be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . -
2397 2397
 				$this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']);
Please login to merge, or discard this patch.
htdocs/core/multicompany_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 $title = $langs->trans("Multicompanies");
82 82
 
83 83
 // URL http://mydolibarr/core/multicompany_page?dol_use_jmobile=1 can be used for tests
84
-$head = '<!-- Multicompany selection -->'."\n";	// This is used by DoliDroid to know page is a multicompany selection page
84
+$head = '<!-- Multicompany selection -->'."\n"; // This is used by DoliDroid to know page is a multicompany selection page
85 85
 $arrayofjs = array();
86 86
 $arrayofcss = array();
87 87
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.