@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | return $texte; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 209 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 210 | 210 | /** |
| 211 | 211 | * Function to build a document on disk using the generic odt module. |
| 212 | 212 | * |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | */ |
| 221 | 221 | public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
| 222 | 222 | { |
| 223 | - // phpcs:enable |
|
| 223 | + // phpcs:enable |
|
| 224 | 224 | global $user, $langs, $conf, $mysoc, $hookmanager; |
| 225 | 225 | global $action; |
| 226 | 226 | |
@@ -189,7 +189,7 @@ |
||
| 189 | 189 | $maxfilesizearray = getMaxFileSizeArray(); |
| 190 | 190 | $maxmin = $maxfilesizearray['maxmin']; |
| 191 | 191 | if ($maxmin > 0) { |
| 192 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 192 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 193 | 193 | } |
| 194 | 194 | $texte .= ' <input type="file" name="uploadfile">'; |
| 195 | 195 | $texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | abstract class ModelePDFMyObject extends CommonDocGenerator |
| 40 | 40 | { |
| 41 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 41 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 42 | 42 | /** |
| 43 | 43 | * Return list of active generation modules |
| 44 | 44 | * |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public static function liste_modeles($db, $maxfilenamelength = 0) |
| 50 | 50 | { |
| 51 | - // phpcs:enable |
|
| 51 | + // phpcs:enable |
|
| 52 | 52 | $type = 'myobject'; |
| 53 | 53 | $list = array(); |
| 54 | 54 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | |
| 93 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 93 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 94 | 94 | /** |
| 95 | 95 | * This is the main function that returns the array of emails |
| 96 | 96 | * |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function add_to_target($mailing_id) |
| 101 | 101 | { |
| 102 | - // phpcs:enable |
|
| 102 | + // phpcs:enable |
|
| 103 | 103 | $target = array(); |
| 104 | 104 | $j = 0; |
| 105 | 105 | |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | return $this->LibStatut($this->status, $mode); |
| 980 | 980 | } |
| 981 | 981 | |
| 982 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 982 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 983 | 983 | /** |
| 984 | 984 | * Return the label of a given status |
| 985 | 985 | * |
@@ -989,7 +989,7 @@ discard block |
||
| 989 | 989 | */ |
| 990 | 990 | public function LibStatut($status, $mode = 0) |
| 991 | 991 | { |
| 992 | - // phpcs:enable |
|
| 992 | + // phpcs:enable |
|
| 993 | 993 | if (is_null($status)) { |
| 994 | 994 | return ''; |
| 995 | 995 | } |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | /** |
| 172 | 172 | * @var int Thirdparty ID |
| 173 | 173 | */ |
| 174 | - public $socid; // both socid and fk_soc are used |
|
| 175 | - public $fk_soc; // both socid and fk_soc are used |
|
| 174 | + public $socid; // both socid and fk_soc are used |
|
| 175 | + public $fk_soc; // both socid and fk_soc are used |
|
| 176 | 176 | |
| 177 | 177 | /** |
| 178 | 178 | * @var int Status |
@@ -1058,7 +1058,7 @@ discard block |
||
| 1058 | 1058 | $this->date_creation = $this->db->jdate($obj->datec); |
| 1059 | 1059 | $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); |
| 1060 | 1060 | if (!empty($obj->datev)) { |
| 1061 | - $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); |
|
| 1061 | + $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); |
|
| 1062 | 1062 | } |
| 1063 | 1063 | } |
| 1064 | 1064 | |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | |
| 343 | 343 | |
| 344 | 344 | |
| 345 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 345 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 346 | 346 | /** |
| 347 | 347 | * Clean sensible object datas |
| 348 | 348 | * |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | */ |
| 352 | 352 | protected function _cleanObjectDatas($object) |
| 353 | 353 | { |
| 354 | - // phpcs:enable |
|
| 354 | + // phpcs:enable |
|
| 355 | 355 | $object = parent::_cleanObjectDatas($object); |
| 356 | 356 | |
| 357 | 357 | unset($object->rowid); |
@@ -1488,7 +1488,7 @@ discard block |
||
| 1488 | 1488 | return $this->LibStatut($this->status, $mode, $this->date_debut); |
| 1489 | 1489 | } |
| 1490 | 1490 | |
| 1491 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1491 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1492 | 1492 | /** |
| 1493 | 1493 | * Returns the label of a status |
| 1494 | 1494 | * |
@@ -1499,7 +1499,7 @@ discard block |
||
| 1499 | 1499 | */ |
| 1500 | 1500 | public function LibStatut($status, $mode = 0, $startdate = '') |
| 1501 | 1501 | { |
| 1502 | - // phpcs:enable |
|
| 1502 | + // phpcs:enable |
|
| 1503 | 1503 | global $langs; |
| 1504 | 1504 | |
| 1505 | 1505 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
@@ -2041,7 +2041,7 @@ discard block |
||
| 2041 | 2041 | } |
| 2042 | 2042 | |
| 2043 | 2043 | |
| 2044 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2044 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2045 | 2045 | /** |
| 2046 | 2046 | * Return list of people with permission to validate leave requests. |
| 2047 | 2047 | * Search for permission "approve leave requests" |
@@ -2050,7 +2050,7 @@ discard block |
||
| 2050 | 2050 | */ |
| 2051 | 2051 | public function fetch_users_approver_holiday() |
| 2052 | 2052 | { |
| 2053 | - // phpcs:enable |
|
| 2053 | + // phpcs:enable |
|
| 2054 | 2054 | $users_validator = array(); |
| 2055 | 2055 | |
| 2056 | 2056 | $sql = "SELECT DISTINCT ur.fk_user"; |
@@ -2431,7 +2431,7 @@ discard block |
||
| 2431 | 2431 | } |
| 2432 | 2432 | } |
| 2433 | 2433 | |
| 2434 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2434 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2435 | 2435 | /** |
| 2436 | 2436 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 2437 | 2437 | * |
@@ -2440,7 +2440,7 @@ discard block |
||
| 2440 | 2440 | */ |
| 2441 | 2441 | public function load_board($user) |
| 2442 | 2442 | { |
| 2443 | - // phpcs:enable |
|
| 2443 | + // phpcs:enable |
|
| 2444 | 2444 | global $conf, $langs; |
| 2445 | 2445 | |
| 2446 | 2446 | if ($user->socid) { |
@@ -1309,7 +1309,7 @@ discard block |
||
| 1309 | 1309 | } |
| 1310 | 1310 | |
| 1311 | 1311 | // We found a record, user is on holiday by default, so is not available is true. |
| 1312 | - $isavailablemorning = true; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1312 | + $isavailablemorning = true; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1313 | 1313 | foreach ($arrayofrecord as $record) { |
| 1314 | 1314 | if ($timestamp == $record['date_start'] && $record['halfday'] == 2) { |
| 1315 | 1315 | continue; |
@@ -1320,7 +1320,7 @@ discard block |
||
| 1320 | 1320 | $isavailablemorning = false; |
| 1321 | 1321 | break; |
| 1322 | 1322 | } |
| 1323 | - $isavailableafternoon = true; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1323 | + $isavailableafternoon = true; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 1324 | 1324 | foreach ($arrayofrecord as $record) { |
| 1325 | 1325 | if ($timestamp == $record['date_end'] && $record['halfday'] == 2) { |
| 1326 | 1326 | continue; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | |
| 160 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 160 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 161 | 161 | /** |
| 162 | 162 | * Load description int this->array_import_module, this->array_import_fields, ... of an importable dataset |
| 163 | 163 | * |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public function load_arrays($user, $filter = '') |
| 169 | 169 | { |
| 170 | - // phpcs:enable |
|
| 170 | + // phpcs:enable |
|
| 171 | 171 | global $langs, $conf; |
| 172 | 172 | |
| 173 | 173 | dol_syslog(get_class($this) . "::load_arrays user=" . $user->id . " filter=" . $filter); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | |
| 288 | 288 | |
| 289 | 289 | |
| 290 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 290 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 291 | 291 | /** |
| 292 | 292 | * Build an import example file. |
| 293 | 293 | * Arrays this->array_export_xxx are already loaded for required datatoexport |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | */ |
| 301 | 301 | public function build_example_file($model, $headerlinefields, $contentlinevalues, $datatoimport) |
| 302 | 302 | { |
| 303 | - // phpcs:enable |
|
| 303 | + // phpcs:enable |
|
| 304 | 304 | global $conf, $langs; |
| 305 | 305 | |
| 306 | 306 | $indice = 0; |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | print '<table class="noborder centpercent">'; |
| 534 | 534 | |
| 535 | 535 | print '<tr class="liste_titre">'; |
| 536 | - // Action column |
|
| 536 | + // Action column |
|
| 537 | 537 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 538 | 538 | print '<td> </td>'; |
| 539 | 539 | } |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | print '<td class="center">' . $langs->trans("WithdrawalReceipt") . '</td>'; |
| 548 | 548 | } |
| 549 | 549 | print '<td> </td>'; |
| 550 | - // Action column |
|
| 550 | + // Action column |
|
| 551 | 551 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 552 | 552 | print '<td> </td>'; |
| 553 | 553 | } |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | return $paymentsalary; |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 458 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 459 | 459 | /** |
| 460 | 460 | * Clean sensible object datas |
| 461 | 461 | * |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | */ |
| 465 | 465 | protected function _cleanObjectDatas($object) |
| 466 | 466 | { |
| 467 | - // phpcs:enable |
|
| 467 | + // phpcs:enable |
|
| 468 | 468 | $object = parent::_cleanObjectDatas($object); |
| 469 | 469 | |
| 470 | 470 | unset($object->rowid); |
@@ -445,7 +445,9 @@ |
||
| 445 | 445 | { |
| 446 | 446 | $paymentsalary = array(); |
| 447 | 447 | $fields = Salaries::$FIELDSPAYMENT; |
| 448 | - if (isModEnabled("bank")) array_push($fields, "accountid"); |
|
| 448 | + if (isModEnabled("bank")) { |
|
| 449 | + array_push($fields, "accountid"); |
|
| 450 | + } |
|
| 449 | 451 | foreach ($fields as $field) { |
| 450 | 452 | if (!isset($data[$field])) { |
| 451 | 453 | throw new RestException(400, "$field field missing"); |