Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/core/modules/security/generate/modGeneratePassPerso.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 			return $pass;
193 193
 		}
194 194
 
195
-		return $this->getNewGeneratedPassword();	// warning, may generate infinite loop if conditions are not possible
195
+		return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible
196 196
 	}
197 197
 
198 198
 	/**
@@ -206,11 +206,11 @@  discard block
 block discarded – undo
206 206
 	{
207 207
 		global $langs;
208 208
 
209
-		$this->initAll();	// For the case this method is called alone
209
+		$this->initAll(); // For the case this method is called alone
210 210
 
211 211
 		$password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY);
212 212
 		$maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY);
213
-		$num = preg_split('//u', $this->Nb, null, PREG_SPLIT_NO_EMPTY);;
213
+		$num = preg_split('//u', $this->Nb, null, PREG_SPLIT_NO_EMPTY); ;
214 214
 		$spe = preg_split('//u', $this->Spe, null, PREG_SPLIT_NO_EMPTY);
215 215
 		/*
216 216
 		$password_a = str_split($password);
Please login to merge, or discard this patch.
htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	$h = 0;
38 38
 	$head = array();
39 39
 
40
-	$withProjectUrl='';
41
-	if ($with_project>0) {
40
+	$withProjectUrl = '';
41
+	if ($with_project > 0) {
42 42
 		$withProjectUrl = "&withproject=1";
43 43
 	}
44 44
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	$head[$h][2] = 'conferenceorbooth';
132 132
 	// Enable caching of conf or booth count attendees
133 133
 	$nbAttendees = 0;
134
-	$nbConferenceOrBooth= 0;
134
+	$nbConferenceOrBooth = 0;
135 135
 	require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
136 136
 	$cachekey = 'count_conferenceorbooth_project_'.$object->id;
137 137
 	$dataretrieved = dol_getcache($cachekey);
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 		$nbAttendees = $dataretrieved;
140 140
 	} else {
141 141
 		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
142
-		$conforbooth=new ConferenceOrBooth($db);
142
+		$conforbooth = new ConferenceOrBooth($db);
143 143
 		$result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id));
144
-		if (!is_array($result) && $result<0) {
144
+		if (!is_array($result) && $result < 0) {
145 145
 			setEventMessages($conforbooth->error, $conforbooth->errors, 'errors');
146 146
 		} else {
147 147
 			$nbConferenceOrBooth = count($result);
148 148
 		}
149
-		dol_setcache($cachekey, $nbConferenceOrBooth, 120);	// If setting cache fails, this is not a problem, so we do not test result.
149
+		dol_setcache($cachekey, $nbConferenceOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result.
150 150
 	}
151 151
 	if ($nbConferenceOrBooth > 0) {
152 152
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbConferenceOrBooth.'</span>';
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
 		$nbAttendees = $dataretrieved;
166 166
 	} else {
167 167
 		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
168
-		$attendees=new ConferenceOrBoothAttendee($db);
168
+		$attendees = new ConferenceOrBoothAttendee($db);
169 169
 		$result = $attendees->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id));
170
-		if (!is_array($result) && $result<0) {
170
+		if (!is_array($result) && $result < 0) {
171 171
 			setEventMessages($attendees->error, $attendees->errors, 'errors');
172 172
 		} else {
173 173
 			$nbAttendees = count($result);
174 174
 		}
175
-		dol_setcache($cachekey, $nbAttendees, 120);	// If setting cache fails, this is not a problem, so we do not test result.
175
+		dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result.
176 176
 	}
177 177
 	if ($nbAttendees > 0) {
178 178
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbAttendees.'</span>';
Please login to merge, or discard this patch.
htdocs/eventorganization/conferenceorbooth_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 if ($user->socid > 0) {
91 91
 	accessforbidden();
92 92
 }
93
-$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
93
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
94 94
 $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
95 95
 
96 96
 if (!$permissiontoread) {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	$projectstatic->fetch_thirdparty();
179 179
 }
180 180
 
181
-$withProjectUrl='';
181
+$withProjectUrl = '';
182 182
 $object->project = clone $projectstatic;
183 183
 
184 184
 if (!empty($withproject)) {
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 	//$keyforbreak='fieldkeytoswitchonsecondcolumn';	// We change column just before this field
532 532
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
533 533
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
534
-	$keyforbreak='num_vote';
534
+	$keyforbreak = 'num_vote';
535 535
 
536 536
 	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
537 537
 
@@ -603,12 +603,12 @@  discard block
 block discarded – undo
603 603
 
604 604
 		$object->fetchObjectLinked();
605 605
 
606
-		if (is_array($object->linkedObjects) && count($object->linkedObjects)>0 && array_key_exists("facture", $object->linkedObjects)) {
606
+		if (is_array($object->linkedObjects) && count($object->linkedObjects) > 0 && array_key_exists("facture", $object->linkedObjects)) {
607 607
 			foreach ($object->linkedObjects["facture"] as $fac) {
608 608
 				if (empty($fac->paye)) {
609 609
 					$key = 'paymentlink_'.$fac->id;
610 610
 
611
-					print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>';
611
+					print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')).' '.$fac->ref.'</span><br>';
612 612
 
613 613
 					$sourcetouse = 'boothlocation';
614 614
 					$reftouse = $fac->id;
Please login to merge, or discard this patch.
htdocs/eventorganization/conferenceorbooth_document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 if ($user->socid > 0) {
100 100
 	accessforbidden();
101 101
 }
102
-$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
102
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
103 103
 $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
104 104
 
105 105
 if (!$permissiontoread) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	$projectstatic->fetch_thirdparty();
139 139
 }
140 140
 
141
-$withProjectUrl='';
141
+$withProjectUrl = '';
142 142
 $object->project = clone $projectstatic;
143 143
 
144 144
 if (!empty($withproject)) {
Please login to merge, or discard this patch.
htdocs/workstation/class/workstation.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -856,7 +856,9 @@
 block discarded – undo
856 856
 
857 857
 		$statusType = 'status'.$status;
858 858
 		//if ($status == self::STATUS_DISABLED) $statusType = 'status6';
859
-		if ($status == self::STATUS_ENABLED) $statusType = 'status4';
859
+		if ($status == self::STATUS_ENABLED) {
860
+			$statusType = 'status4';
861
+		}
860 862
 
861 863
 		return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
862 864
 	}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	/**
99 99
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
100 100
 	 */
101
-	public $fields=array(
101
+	public $fields = array(
102 102
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
103 103
 		'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'default'=>'', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
104 104
 		'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'showoncombobox'=>'2',),
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
112 112
 		'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>512, 'notnull'=>-1, 'visible'=>-2,),
113 113
 		'nb_operators_required' => array('type'=>'integer', 'label'=>'NbOperatorsRequired', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,),
114
-		'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp','label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'),
114
+		'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp', 'label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'),
115 115
 		'thm_machine_estimated' => array('type'=>'double', 'help'=>'THMMachineEstimatedHelp', 'label'=>'THMMachineEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'),
116 116
 		'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'),),
117 117
 	);
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 		// Usergroups
489 489
 		$groups = GETPOST('groups', 'array:int');
490 490
 		WorkstationUserGroup::deleteAllGroupsOfWorkstation($this->id);
491
-		$this->usergroups=array();
491
+		$this->usergroups = array();
492 492
 
493 493
 		foreach ($groups as $id_group) {
494 494
 			$ws_usergroup = new WorkstationUserGroup($this->db);
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 		// Resources
502 502
 		$resources = GETPOST('resources', 'array:int');
503 503
 		WorkstationResource::deleteAllResourcesOfWorkstation($this->id);
504
-		$this->resources=array();
504
+		$this->resources = array();
505 505
 		if (!empty($resources)) {
506 506
 			foreach ($resources as $id_resource) {
507 507
 				$ws_resource = new WorkstationResource($this->db);
Please login to merge, or discard this patch.
htdocs/compta/bank/releve.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 					$balancestart[$objp->numr] = $obj->amount;
348 348
 					$db->free($resql);
349 349
 				}
350
-				print '<td class="right"><span class="amount">'.price($balancestart[$objp->numr], '', $langs, 1, -1, -1, empty($object->currency_code)?$conf->currency:$object->currency_code).'</span></td>';
350
+				print '<td class="right"><span class="amount">'.price($balancestart[$objp->numr], '', $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).'</span></td>';
351 351
 
352 352
 				// Calculate end amount
353 353
 				$sql = "SELECT sum(b.amount) as amount";
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 					$content[$objp->numr] = $obj->amount;
361 361
 					$db->free($resql);
362 362
 				}
363
-				print '<td class="right"><span class="amount">'.price(($balancestart[$objp->numr] + $content[$objp->numr]), '', $langs, 1, -1, -1, empty($object->currency_code)?$conf->currency:$object->currency_code).'</span></td>';
363
+				print '<td class="right"><span class="amount">'.price(($balancestart[$objp->numr] + $content[$objp->numr]), '', $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).'</span></td>';
364 364
 
365 365
 				print '<td class="center">';
366 366
 				if ($user->rights->banque->consolidate && $action != 'editbankreceipt') {
Please login to merge, or discard this patch.
htdocs/admin/tools/listevents.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 }
43 43
 
44 44
 // Load translation files required by the page
45
-$langs->loadLangs(array("companies", "admin", "users", "other","withdrawals"));
45
+$langs->loadLangs(array("companies", "admin", "users", "other", "withdrawals"));
46 46
 
47 47
 // Load variable for pagination
48 48
 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 if ($date_start !== '') {
211 211
 	$sql .= " AND e.dateevent >= '".$db->idate($date_start)."'";
212 212
 }
213
-if ($date_end !== '' ) {
213
+if ($date_end !== '') {
214 214
 	$sql .= " AND e.dateevent <= '".$db->idate($date_end)."'";
215 215
 }
216 216
 if ($search_code) {
Please login to merge, or discard this patch.
htdocs/core/modules/takepos/mod_takepos_ref_simple.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function getExample()
78 78
 	{
79
-		return $this->prefix.'0-0501-0001';		// TC0-0501-0001
79
+		return $this->prefix.'0-0501-0001'; // TC0-0501-0001
80 80
 	}
81 81
 
82 82
 	/**
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 		$pryymm = '';
93 93
 		$max = '';
94 94
 
95
-		$pos_source = 0;	// POS source = Terminal ID
95
+		$pos_source = 0; // POS source = Terminal ID
96 96
 
97 97
 		// First, we get the max value
98
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
98
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
99 99
 
100 100
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
101 101
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 	{
136 136
 		global $db;
137 137
 
138
-		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0;	// POS source = Terminal ID
138
+		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID
139 139
 
140 140
 		// First, we get the max value
141
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
141
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
142 142
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
143 143
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
144 144
 		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'";
Please login to merge, or discard this patch.
htdocs/recruitment/class/api_recruitment.class.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -368,15 +368,15 @@
 block discarded – undo
368 368
 	}
369 369
 
370 370
 	/**
371
-	* Create candidature object
372
-	*
373
-	* @param array $request_data   Request datas
374
-	* @return int  ID of candidature
375
-	*
376
-	* @throws RestException
377
-	*
378
-	* @url	POST candidature/
379
-	*/
371
+	 * Create candidature object
372
+	 *
373
+	 * @param array $request_data   Request datas
374
+	 * @return int  ID of candidature
375
+	 *
376
+	 * @throws RestException
377
+	 *
378
+	 * @url	POST candidature/
379
+	 */
380 380
 	public function postCandidature($request_data = null)
381 381
 	{
382 382
 		if (!DolibarrApiAccess::$user->rights->recruitment->recruitmentjobposition->write) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 		// Clean data
367 367
 		// $this->jobposition->abc = sanitizeVal($this->jobposition->abc, 'alphanohtml');
368 368
 
369
-		if ($this->jobposition->create(DolibarrApiAccess::$user)<0) {
369
+		if ($this->jobposition->create(DolibarrApiAccess::$user) < 0) {
370 370
 			throw new RestException(500, "Error creating jobposition", array_merge(array($this->jobposition->error), $this->jobposition->errors));
371 371
 		}
372 372
 		return $this->jobposition->id;
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 		// Clean data
399 399
 		// $this->jobposition->abc = sanitizeVal($this->jobposition->abc, 'alphanohtml');
400 400
 
401
-		if ($this->candidature->create(DolibarrApiAccess::$user)<0) {
401
+		if ($this->candidature->create(DolibarrApiAccess::$user) < 0) {
402 402
 			throw new RestException(500, "Error creating candidature", array_merge(array($this->candidature->error), $this->candidature->errors));
403 403
 		}
404 404
 		return $this->candidature->id;
Please login to merge, or discard this patch.