@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | if ($result > 0) { |
112 | 112 | setEventMessages($langs->trans("AllMovementsWereRecordedAsValidated"), null, 'mesgs'); |
113 | 113 | |
114 | - header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : '')); |
|
114 | + header("Location: ".$_SERVER['PHP_SELF'].(isset($current_fiscal_period) ? '?fiscal_period_id='.$current_fiscal_period['id'] : '')); |
|
115 | 115 | exit; |
116 | 116 | } else { |
117 | 117 | setEventMessages($langs->trans("NotAllMovementsCouldBeRecordedAsValidated"), null, 'errors'); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } else { |
130 | 130 | setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs'); |
131 | 131 | |
132 | - header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : '')); |
|
132 | + header("Location: ".$_SERVER['PHP_SELF'].(isset($current_fiscal_period) ? '?fiscal_period_id='.$current_fiscal_period['id'] : '')); |
|
133 | 133 | exit; |
134 | 134 | } |
135 | 135 | } elseif ($action == 'confirm_step_3' && $confirm == "yes") { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } else { |
145 | 145 | setEventMessages($langs->trans("AccountancyClosureInsertAccountingReversalSuccessfully"), null, 'mesgs'); |
146 | 146 | |
147 | - header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : '')); |
|
147 | + header("Location: ".$_SERVER['PHP_SELF'].(isset($current_fiscal_period) ? '?fiscal_period_id='.$current_fiscal_period['id'] : '')); |
|
148 | 148 | exit; |
149 | 149 | } |
150 | 150 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | ); |
186 | 186 | |
187 | 187 | $formconfirm = $form->formconfirm( |
188 | - $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'], |
|
188 | + $_SERVER["PHP_SELF"].'?fiscal_period_id='.$current_fiscal_period['id'], |
|
189 | 189 | $langs->trans('ValidateMovements'), |
190 | 190 | $langs->trans('DescValidateMovements', $langs->transnoentitiesnoconv("RegistrationInAccounting")), |
191 | 191 | 'confirm_step_1', |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | ); |
223 | 223 | |
224 | 224 | $formconfirm = $form->formconfirm( |
225 | - $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'], |
|
225 | + $_SERVER["PHP_SELF"].'?fiscal_period_id='.$current_fiscal_period['id'], |
|
226 | 226 | $langs->trans('AccountancyClosureClose'), |
227 | 227 | $langs->trans('AccountancyClosureConfirmClose'), |
228 | 228 | 'confirm_step_2', |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | ); |
266 | 266 | |
267 | 267 | $formconfirm = $form->formconfirm( |
268 | - $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'], |
|
268 | + $_SERVER["PHP_SELF"].'?fiscal_period_id='.$current_fiscal_period['id'], |
|
269 | 269 | $langs->trans('AccountancyClosureAccountingReversal'), |
270 | 270 | $langs->trans('AccountancyClosureConfirmAccountingReversal'), |
271 | 271 | 'confirm_step_3', |
@@ -291,13 +291,13 @@ discard block |
||
291 | 291 | |
292 | 292 | $fiscal_period_nav_text = $langs->trans("FiscalPeriod"); |
293 | 293 | |
294 | -$fiscal_period_nav_text .= ' <a href="' . (isset($last_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $last_fiscal_period['id'] : '#" class="disabled') . '">' . img_previous() . '</a>'; |
|
295 | -$fiscal_period_nav_text .= ' <a href="' . (isset($next_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $next_fiscal_period['id'] : '#" class="disabled') . '">' . img_next() . '</a>'; |
|
294 | +$fiscal_period_nav_text .= ' <a href="'.(isset($last_fiscal_period) ? $_SERVER["PHP_SELF"].'?fiscal_period_id='.$last_fiscal_period['id'] : '#" class="disabled').'">'.img_previous().'</a>'; |
|
295 | +$fiscal_period_nav_text .= ' <a href="'.(isset($next_fiscal_period) ? $_SERVER["PHP_SELF"].'?fiscal_period_id='.$next_fiscal_period['id'] : '#" class="disabled').'">'.img_next().'</a>'; |
|
296 | 296 | if (!empty($current_fiscal_period)) { |
297 | - $fiscal_period_nav_text .= $current_fiscal_period['label'].' (' . (isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day') . ' - ' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')' : ''); |
|
297 | + $fiscal_period_nav_text .= $current_fiscal_period['label'].' ('.(isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day').' - '.dol_print_date($current_fiscal_period['date_end'], 'day').')' : ''); |
|
298 | 298 | } |
299 | 299 | |
300 | -print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy'); |
|
300 | +print load_fiche_titre($langs->trans("Closure")." - ".$fiscal_period_nav_text, '', 'title_accountancy'); |
|
301 | 301 | |
302 | 302 | if (empty($current_fiscal_period)) { |
303 | 303 | print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->trans("Accounting"), $langs->trans("Setup"), $langs->trans("FiscalPeriod")); |
@@ -306,12 +306,12 @@ discard block |
||
306 | 306 | if (isset($current_fiscal_period)) { |
307 | 307 | // Step 1 |
308 | 308 | $head = array(); |
309 | - $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; |
|
309 | + $head[0][0] = DOL_URL_ROOT.'/accountancy/closure/index.php?fiscal_period_id='.$current_fiscal_period['id']; |
|
310 | 310 | $head[0][1] = $langs->trans("AccountancyClosureStep1"); |
311 | 311 | $head[0][2] = 'step1'; |
312 | 312 | print dol_get_fiche_head($head, 'step1', '', -1, ''); |
313 | 313 | |
314 | - print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep1Desc") . '</span><br>'; |
|
314 | + print '<span class="opacitymedium">'.$langs->trans("AccountancyClosureStep1Desc").'</span><br>'; |
|
315 | 315 | |
316 | 316 | $count_by_month = $object->getCountByMonthForFiscalPeriod($current_fiscal_period['date_start'], $current_fiscal_period['date_end']); |
317 | 317 | if (!is_array($count_by_month)) { |
@@ -319,9 +319,9 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | if (empty($count_by_month['total'])) { |
322 | - $buttonvalidate = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("ValidateMovements") . '</a>'; |
|
322 | + $buttonvalidate = '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("ValidateMovements").'</a>'; |
|
323 | 323 | } else { |
324 | - $buttonvalidate = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_1&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("ValidateMovements") . '</a>'; |
|
324 | + $buttonvalidate = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=step_1&fiscal_period_id='.$current_fiscal_period['id'].'">'.$langs->trans("ValidateMovements").'</a>'; |
|
325 | 325 | } |
326 | 326 | print_barre_liste($langs->trans("OverviewOfMovementsNotValidated"), '', '', '', '', '', '', -1, '', '', 0, $buttonvalidate, '', 0, 1, 0); |
327 | 327 | |
@@ -331,24 +331,24 @@ discard block |
||
331 | 331 | print '<tr class="liste_titre">'; |
332 | 332 | $nb_years = is_array($count_by_month['list']) ? count($count_by_month['list']) : 0; |
333 | 333 | if ($nb_years > 1) { |
334 | - print '<td class="right">' . $langs->trans("Year") . '</td>'; |
|
334 | + print '<td class="right">'.$langs->trans("Year").'</td>'; |
|
335 | 335 | } |
336 | 336 | for ($i = 1; $i <= 12; $i++) { |
337 | - print '<td class="right">' . $langs->trans('MonthShort' . str_pad((string) $i, 2, '0', STR_PAD_LEFT)) . '</td>'; |
|
337 | + print '<td class="right">'.$langs->trans('MonthShort'.str_pad((string) $i, 2, '0', STR_PAD_LEFT)).'</td>'; |
|
338 | 338 | } |
339 | - print '<td class="right"><b>' . $langs->trans("Total") . '</b></td>'; |
|
339 | + print '<td class="right"><b>'.$langs->trans("Total").'</b></td>'; |
|
340 | 340 | print '</tr>'; |
341 | 341 | |
342 | 342 | if (is_array($count_by_month['list'])) { |
343 | 343 | foreach ($count_by_month['list'] as $info) { |
344 | 344 | print '<tr class="oddeven">'; |
345 | 345 | if ($nb_years > 1) { |
346 | - print '<td class="right">' . $info['year'] . '</td>'; |
|
346 | + print '<td class="right">'.$info['year'].'</td>'; |
|
347 | 347 | } |
348 | 348 | for ($i = 1; $i <= 12; $i++) { |
349 | - print '<td class="right">' . ((int) $info['count'][$i]) . '</td>'; |
|
349 | + print '<td class="right">'.((int) $info['count'][$i]).'</td>'; |
|
350 | 350 | } |
351 | - print '<td class="right"><b>' . $info['total'] . '</b></td></tr>'; |
|
351 | + print '<td class="right"><b>'.$info['total'].'</b></td></tr>'; |
|
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | |
360 | 360 | // Step 2 |
361 | 361 | $head = array(); |
362 | - $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; |
|
362 | + $head[0][0] = DOL_URL_ROOT.'/accountancy/closure/index.php?fiscal_period_id='.$current_fiscal_period['id']; |
|
363 | 363 | $head[0][1] = $langs->trans("AccountancyClosureStep2"); |
364 | 364 | $head[0][2] = 'step2'; |
365 | 365 | print dol_get_fiche_head($head, 'step2', '', -1, ''); |
@@ -367,9 +367,9 @@ discard block |
||
367 | 367 | // print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep2Desc") . '</span><br>'; |
368 | 368 | |
369 | 369 | if (empty($count_by_month['total']) && empty($current_fiscal_period['status'])) { |
370 | - $button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_2&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureClose") . '</a>'; |
|
370 | + $button = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=step_2&fiscal_period_id='.$current_fiscal_period['id'].'">'.$langs->trans("AccountancyClosureClose").'</a>'; |
|
371 | 371 | } else { |
372 | - $button = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("AccountancyClosureClose") . '</a>'; |
|
372 | + $button = '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AccountancyClosureClose").'</a>'; |
|
373 | 373 | } |
374 | 374 | print_barre_liste('', '', '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0); |
375 | 375 | |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | // Step 3 |
379 | 379 | $head = array(); |
380 | - $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; |
|
380 | + $head[0][0] = DOL_URL_ROOT.'/accountancy/closure/index.php?fiscal_period_id='.$current_fiscal_period['id']; |
|
381 | 381 | $head[0][1] = $langs->trans("AccountancyClosureStep3"); |
382 | 382 | $head[0][2] = 'step3'; |
383 | 383 | print dol_get_fiche_head($head, 'step3', '', -1, ''); |
@@ -385,9 +385,9 @@ discard block |
||
385 | 385 | // print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep3Desc") . '</span><br>'; |
386 | 386 | |
387 | 387 | if (empty($current_fiscal_period['status'])) { |
388 | - $button = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>'; |
|
388 | + $button = '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AccountancyClosureAccountingReversal").'</a>'; |
|
389 | 389 | } else { |
390 | - $button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_3&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>'; |
|
390 | + $button = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=step_3&fiscal_period_id='.$current_fiscal_period['id'].'">'.$langs->trans("AccountancyClosureAccountingReversal").'</a>'; |
|
391 | 391 | } |
392 | 392 | print_barre_liste('', '', '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0); |
393 | 393 | } |
@@ -145,38 +145,38 @@ discard block |
||
145 | 145 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
146 | 146 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
147 | 147 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
148 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
148 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
149 | 149 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
150 | 150 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
151 | 151 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
152 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
152 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
153 | 153 | |
154 | 154 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
155 | 155 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
156 | 156 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
157 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
157 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
158 | 158 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
159 | 159 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
160 | 160 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
161 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
161 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
162 | 162 | |
163 | 163 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
164 | 164 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
165 | 165 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
166 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
166 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
167 | 167 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
168 | 168 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
169 | 169 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
170 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
170 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
171 | 171 | |
172 | 172 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
173 | 173 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
174 | 174 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
175 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
175 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
176 | 176 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
177 | 177 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
178 | 178 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
179 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
179 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
180 | 180 | |
181 | 181 | $search_category_array = array(); |
182 | 182 | |
@@ -262,14 +262,14 @@ discard block |
||
262 | 262 | |
263 | 263 | $object->fields = dol_sort_array($object->fields, 'position'); |
264 | 264 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
265 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
265 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
266 | 266 | |
267 | 267 | // Add a groupby field. Set $groupby and $groupbyvalues. |
268 | 268 | // TODO Move this into a inc file |
269 | 269 | $groupbyvalues = array(); |
270 | 270 | if ($mode == 'kanban') { |
271 | 271 | $groupbyold = null; |
272 | - $groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
272 | + $groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
273 | 273 | $groupbyfield = preg_replace('/[a-z]\./', '', $groupby); |
274 | 274 | if (!empty($object->fields[$groupbyfield]['alias'])) { |
275 | 275 | $groupbyfield = $object->fields[$groupbyfield]['alias']; |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | if ($searchCategoryProjectOperator == 0) { |
719 | 719 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
720 | 720 | } else { |
721 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
721 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
722 | 722 | } |
723 | 723 | } |
724 | 724 | } |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
922 | 922 | } |
923 | 923 | if ($search_date_end_end) { |
924 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
924 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
925 | 925 | } |
926 | 926 | if ($search_date_creation_startmonth) { |
927 | 927 | $param .= '&search_date_creation_startmonth='.urlencode((string) ($search_date_creation_startmonth)); |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | $param .= '&search_date_modif_endday='.urlencode((string) ($search_date_modif_endday)); |
970 | 970 | } |
971 | 971 | if ($search_date_modif_end) { |
972 | - $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end); |
|
972 | + $param .= '&search_date_modif_end='.urlencode($search_date_modif_end); |
|
973 | 973 | } |
974 | 974 | if (!empty($search_category_array)) { |
975 | 975 | foreach ($search_category_array as $tmpval) { |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | } |
1191 | 1191 | |
1192 | 1192 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1193 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1193 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1194 | 1194 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1195 | 1195 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1196 | 1196 | |
@@ -1651,7 +1651,7 @@ discard block |
||
1651 | 1651 | |
1652 | 1652 | if (!empty($groupby)) { |
1653 | 1653 | if (is_null($groupbyold)) { |
1654 | - print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
1654 | + print '<div class="box-flex-container-columns kanban">'; // Start div for all kanban columns |
|
1655 | 1655 | } |
1656 | 1656 | // Start kanban column |
1657 | 1657 | if (is_null($obj->$groupbyfield)) { |
@@ -1661,13 +1661,13 @@ discard block |
||
1661 | 1661 | } |
1662 | 1662 | if ($groupbyold !== $groupbyvalue) { |
1663 | 1663 | if (!is_null($groupbyold)) { |
1664 | - print '</div>'; // We need a new kanban column - end box-flex-container |
|
1664 | + print '</div>'; // We need a new kanban column - end box-flex-container |
|
1665 | 1665 | } |
1666 | 1666 | // TODO Create kanban column for all values into $groupbyvalues, until we reach the new $obj->$groupbyfield |
1667 | 1667 | // |
1668 | 1668 | //var_dump($groupbyvalues); |
1669 | 1669 | //var_dump($obj->$groupbyfield); |
1670 | - print '<div class="box-flex-container-column kanban column" data-html="column_'.preg_replace('/[^a-z0-9]/', '', $groupbyvalue).'">'; // Start new column |
|
1670 | + print '<div class="box-flex-container-column kanban column" data-html="column_'.preg_replace('/[^a-z0-9]/', '', $groupbyvalue).'">'; // Start new column |
|
1671 | 1671 | } |
1672 | 1672 | $groupbyold = $groupbyvalue; |
1673 | 1673 | } elseif ($i == 0) { |
@@ -1690,10 +1690,10 @@ discard block |
||
1690 | 1690 | if ($i == ($imaxinloop - 1)) { |
1691 | 1691 | // Close kanban column |
1692 | 1692 | if (!empty($groupby)) { |
1693 | - print '</div>'; // end box-flex-container |
|
1694 | - print '</div>'; // end box-flex-container-columns |
|
1693 | + print '</div>'; // end box-flex-container |
|
1694 | + print '</div>'; // end box-flex-container-columns |
|
1695 | 1695 | } else { |
1696 | - print '</div>'; // end box-flex-container |
|
1696 | + print '</div>'; // end box-flex-container |
|
1697 | 1697 | } |
1698 | 1698 | |
1699 | 1699 | print '</td></tr>'; |
@@ -184,12 +184,12 @@ discard block |
||
184 | 184 | if (!empty($user->email)) { |
185 | 185 | $sendto = dolGetFirstLastname($user->firstname, $user->lastname)." <".$user->email.">"; |
186 | 186 | } else { |
187 | - $sendto = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') . '" <' . getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>'; |
|
187 | + $sendto = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'" <'.getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>'; |
|
188 | 188 | } |
189 | 189 | $replyto = $sendto; |
190 | 190 | $sendtocc = ''; |
191 | 191 | if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) { |
192 | - $sendtocc = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL') . '" <' . getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'>'; |
|
192 | + $sendtocc = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'" <'.getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'>'; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | $message = "A bank transfer of ".price2num($event->data->object->amount / 100)." ".$event->data->object->currency." should arrive in your account the ".dol_print_date($event->data->object->arrival_date, 'dayhour'); |
@@ -274,12 +274,12 @@ discard block |
||
274 | 274 | if (!empty($user->email)) { |
275 | 275 | $sendto = dolGetFirstLastname($user->firstname, $user->lastname)." <".$user->email.">"; |
276 | 276 | } else { |
277 | - $sendto = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') . '" <' . getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>'; |
|
277 | + $sendto = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'" <'.getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>'; |
|
278 | 278 | } |
279 | 279 | $replyto = $sendto; |
280 | 280 | $sendtocc = ''; |
281 | 281 | if (getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL')) { |
282 | - $sendtocc = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL') . '" <' . getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'>'; |
|
282 | + $sendtocc = getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'" <'.getDolGlobalString('ONLINE_PAYMENT_SENDEMAIL').'>'; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | $message = "A bank transfer of ".price2num($event->data->object->amount / 100)." ".$event->data->object->currency." has been done to your account the ".dol_print_date($event->data->object->arrival_date, 'dayhour'); |
@@ -319,19 +319,19 @@ discard block |
||
319 | 319 | $db->commit(); |
320 | 320 | } elseif ($event->type == 'payment_intent.succeeded') { // Called when making payment with PaymentIntent method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). |
321 | 321 | //dol_syslog("object = ".var_export($event->data, true)); |
322 | - include_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php'; |
|
322 | + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; |
|
323 | 323 | global $stripearrayofkeysbyenv; |
324 | 324 | $error = 0; |
325 | 325 | $object = $event->data->object; |
326 | - $TRANSACTIONID = $object->id; // Example pi_123456789... |
|
326 | + $TRANSACTIONID = $object->id; // Example pi_123456789... |
|
327 | 327 | $ipaddress = $object->metadata->ipaddress; |
328 | 328 | $now = dol_now(); |
329 | 329 | $currencyCodeType = strtoupper($object->currency); |
330 | 330 | $paymentmethodstripeid = $object->payment_method; |
331 | 331 | $customer_id = $object->customer; |
332 | 332 | $invoice_id = ""; |
333 | - $paymentTypeCode = ""; // payment type according to Stripe |
|
334 | - $paymentTypeCodeInDolibarr = ""; // payment type according to Dolibarr |
|
333 | + $paymentTypeCode = ""; // payment type according to Stripe |
|
334 | + $paymentTypeCodeInDolibarr = ""; // payment type according to Dolibarr |
|
335 | 335 | $payment_amount = 0; |
336 | 336 | $payment_amountInDolibarr = 0; |
337 | 337 | |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | $s = new \Stripe\StripeClient($stripeacc); |
397 | 397 | |
398 | 398 | $paymentmethodstripe = $s->paymentMethods->retrieve($paymentmethodstripeid); |
399 | - $paymentTypeCode = $paymentmethodstripe->type; |
|
399 | + $paymentTypeCode = $paymentmethodstripe->type; |
|
400 | 400 | if ($paymentTypeCode == "ban" || $paymentTypeCode == "sepa_debit") { |
401 | 401 | $paymentTypeCode = "PRE"; |
402 | 402 | } elseif ($paymentTypeCode == "card") { |
@@ -422,9 +422,9 @@ discard block |
||
422 | 422 | $paiement->datepaye = $now; |
423 | 423 | $paiement->date = $now; |
424 | 424 | if ($currencyCodeType == $conf->currency) { |
425 | - $paiement->amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching with invoice id |
|
425 | + $paiement->amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching with invoice id |
|
426 | 426 | } else { |
427 | - $paiement->multicurrency_amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching |
|
427 | + $paiement->multicurrency_amounts = [$invoice_id => $payment_amount]; // Array with all payments dispatching |
|
428 | 428 | |
429 | 429 | $postactionmessages[] = 'Payment was done in a currency ('.$currencyCodeType.') other than the expected currency of company ('.$conf->currency.')'; |
430 | 430 | $ispostactionok = -1; |
@@ -447,8 +447,8 @@ discard block |
||
447 | 447 | |
448 | 448 | $paiement->num_payment = ''; |
449 | 449 | $paiement->note_public = ''; |
450 | - $paiement->note_private = 'StripeSepa payment received by IPN webhook - ' . dol_print_date($now, 'standard') . ' using servicestatus=' . $servicestatus . ($ipaddress ? ' from ip ' . $ipaddress : '') . ' - Transaction ID = ' . $TRANSACTIONID; |
|
451 | - $paiement->ext_payment_id = $TRANSACTIONID.':'.$customer_id.'@'.$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; // May be we should store py_... instead of pi_... but we started with pi_... so we continue. |
|
450 | + $paiement->note_private = 'StripeSepa payment received by IPN webhook - '.dol_print_date($now, 'standard').' using servicestatus='.$servicestatus.($ipaddress ? ' from ip '.$ipaddress : '').' - Transaction ID = '.$TRANSACTIONID; |
|
451 | + $paiement->ext_payment_id = $TRANSACTIONID.':'.$customer_id.'@'.$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; // May be we should store py_... instead of pi_... but we started with pi_... so we continue. |
|
452 | 452 | $paiement->ext_payment_site = $service; |
453 | 453 | |
454 | 454 | $ispaymentdone = 0; |
@@ -466,20 +466,20 @@ discard block |
||
466 | 466 | $db->begin(); |
467 | 467 | |
468 | 468 | if (!$error && !$ispaymentdone) { |
469 | - dol_syslog('* Record payment type PRE for invoice id ' . $invoice_id . '. It includes closing of invoice and regenerating document.'); |
|
469 | + dol_syslog('* Record payment type PRE for invoice id '.$invoice_id.'. It includes closing of invoice and regenerating document.'); |
|
470 | 470 | |
471 | 471 | // This include closing invoices to 'paid' (and trigger including unsuspending) and regenerating document |
472 | 472 | $paiement_id = $paiement->create($user, 1); |
473 | 473 | if ($paiement_id < 0) { |
474 | - $postactionmessages[] = $paiement->error . ($paiement->error ? ' ' : '') . implode("<br>\n", $paiement->errors); |
|
474 | + $postactionmessages[] = $paiement->error.($paiement->error ? ' ' : '').implode("<br>\n", $paiement->errors); |
|
475 | 475 | $ispostactionok = -1; |
476 | 476 | $error++; |
477 | 477 | |
478 | - dol_syslog("Failed to create the payment for invoice id " . $invoice_id); |
|
478 | + dol_syslog("Failed to create the payment for invoice id ".$invoice_id); |
|
479 | 479 | } else { |
480 | 480 | $postactionmessages[] = 'Payment created'; |
481 | 481 | |
482 | - dol_syslog("The payment has been created for invoice id " . $invoice_id); |
|
482 | + dol_syslog("The payment has been created for invoice id ".$invoice_id); |
|
483 | 483 | } |
484 | 484 | } |
485 | 485 | |
@@ -509,14 +509,14 @@ discard block |
||
509 | 509 | $label = '(CustomerInvoicePayment)'; |
510 | 510 | $result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, $customer_id, ''); |
511 | 511 | if ($result < 0) { |
512 | - $postactionmessages[] = $paiement->error . ($paiement->error ? ' ' : '') . implode("<br>\n", $paiement->errors); |
|
512 | + $postactionmessages[] = $paiement->error.($paiement->error ? ' ' : '').implode("<br>\n", $paiement->errors); |
|
513 | 513 | $ispostactionok = -1; |
514 | 514 | $error++; |
515 | 515 | } else { |
516 | 516 | $postactionmessages[] = 'Bank transaction of payment created (by ipn.php file)'; |
517 | 517 | } |
518 | 518 | } else { |
519 | - $postactionmessages[] = 'Setup of bank account to use in module ' . $paymentmethod . ' was not set. No way to record the payment.'; |
|
519 | + $postactionmessages[] = 'Setup of bank account to use in module '.$paymentmethod.' was not set. No way to record the payment.'; |
|
520 | 520 | $ispostactionok = -1; |
521 | 521 | $error++; |
522 | 522 | } |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | $error++; |
681 | 681 | } |
682 | 682 | |
683 | - if (! $error) { |
|
683 | + if (!$error) { |
|
684 | 684 | $db->commit(); |
685 | 685 | } else { |
686 | 686 | $db->rollback(); |
@@ -499,13 +499,13 @@ discard block |
||
499 | 499 | $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url ("; |
500 | 500 | $sql .= "fk_bank"; |
501 | 501 | $sql .= ", url_id"; |
502 | - $sql .= ", url"; // deprecated |
|
502 | + $sql .= ", url"; // deprecated |
|
503 | 503 | $sql .= ", label"; |
504 | 504 | $sql .= ", type"; |
505 | 505 | $sql .= ") VALUES ("; |
506 | 506 | $sql .= ((int) $line_id); |
507 | 507 | $sql .= ", ".((int) $url_id); |
508 | - $sql .= ", '".$this->db->escape($url)."'"; // deprecated |
|
508 | + $sql .= ", '".$this->db->escape($url)."'"; // deprecated |
|
509 | 509 | $sql .= ", '".$this->db->escape($label)."'"; |
510 | 510 | $sql .= ", '".$this->db->escape($type)."'"; |
511 | 511 | $sql .= ")"; |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | $sql .= " WHERE b.rappro=0"; |
1362 | 1362 | $sql .= " AND b.fk_account = ba.rowid"; |
1363 | 1363 | $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; |
1364 | - $sql .= " AND (ba.rappro = 1 AND ba.courant != " . Account::TYPE_CASH . ")"; // Compte rapprochable |
|
1364 | + $sql .= " AND (ba.rappro = 1 AND ba.courant != ".Account::TYPE_CASH.")"; // Compte rapprochable |
|
1365 | 1365 | $sql .= " AND clos = 0"; |
1366 | 1366 | if ($filteraccountid) { |
1367 | 1367 | $sql .= " AND ba.rowid = ".((int) $filteraccountid); |
@@ -1457,7 +1457,7 @@ discard block |
||
1457 | 1457 | $sql .= " WHERE ba.rappro > 0 and ba.clos = 0"; |
1458 | 1458 | $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; |
1459 | 1459 | if (!getDolGlobalString('BANK_CAN_RECONCILIATE_CASHACCOUNT')) { |
1460 | - $sql .= " AND ba.courant != " . Account::TYPE_CASH; |
|
1460 | + $sql .= " AND ba.courant != ".Account::TYPE_CASH; |
|
1461 | 1461 | } |
1462 | 1462 | |
1463 | 1463 | $resql = $this->db->query($sql); |
@@ -1506,9 +1506,9 @@ discard block |
||
1506 | 1506 | } |
1507 | 1507 | // show categories for this record only in ajax to not overload lists |
1508 | 1508 | if (isModEnabled('category') && !$nofetch) { |
1509 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
1509 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
1510 | 1510 | $form = new Form($this->db); |
1511 | - $datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_ACCOUNT, 1); |
|
1511 | + $datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_ACCOUNT, 1); |
|
1512 | 1512 | } |
1513 | 1513 | |
1514 | 1514 | return $datas; |
@@ -1632,7 +1632,7 @@ discard block |
||
1632 | 1632 | $this->error = 'SwiftNotValid'; |
1633 | 1633 | } |
1634 | 1634 | |
1635 | - if (! $error) { |
|
1635 | + if (!$error) { |
|
1636 | 1636 | return 1; |
1637 | 1637 | } else { |
1638 | 1638 | return 0; |
@@ -2489,7 +2489,7 @@ discard block |
||
2489 | 2489 | |
2490 | 2490 | // Check statement field |
2491 | 2491 | if (getDolGlobalString('BANK_STATEMENT_REGEX_RULE')) { |
2492 | - if (!preg_match('/' . getDolGlobalString('BANK_STATEMENT_REGEX_RULE').'/', $this->num_releve)) { |
|
2492 | + if (!preg_match('/'.getDolGlobalString('BANK_STATEMENT_REGEX_RULE').'/', $this->num_releve)) { |
|
2493 | 2493 | $this->errors[] = $langs->trans("ErrorBankStatementNameMustFollowRegex", getDolGlobalString('BANK_STATEMENT_REGEX_RULE')); |
2494 | 2494 | return -1; |
2495 | 2495 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | * View |
68 | 68 | */ |
69 | 69 | |
70 | -$form = new Form($db); // Used in dol_banner_tab |
|
70 | +$form = new Form($db); // Used in dol_banner_tab |
|
71 | 71 | |
72 | 72 | llxHeader('', $langs->trans("Payment")); |
73 | 73 |
@@ -64,34 +64,34 @@ |
||
64 | 64 | // Dolibarr uses a lot of internal deprecated stuff, not reporting |
65 | 65 | 'PhanDeprecatedProperty', |
66 | 66 | |
67 | - 'PhanCompatibleNegativeStringOffset', // return false positive |
|
68 | - 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is |
|
69 | - 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time |
|
67 | + 'PhanCompatibleNegativeStringOffset', // return false positive |
|
68 | + 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is |
|
69 | + 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time |
|
70 | 70 | 'PhanTypeObjectUnsetDeclaredProperty', |
71 | - 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is |
|
72 | - 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is |
|
71 | + 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is |
|
72 | + 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is |
|
73 | 73 | |
74 | - 'PhanPluginWhitespaceTab', // Dolibarr used tabs |
|
75 | - 'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility |
|
76 | - 'PhanPluginShortArray', // Dolibarr uses array() |
|
77 | - 'PhanPluginShortArrayList', // Dolibarr uses array() |
|
74 | + 'PhanPluginWhitespaceTab', // Dolibarr used tabs |
|
75 | + 'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility |
|
76 | + 'PhanPluginShortArray', // Dolibarr uses array() |
|
77 | + 'PhanPluginShortArrayList', // Dolibarr uses array() |
|
78 | 78 | // Fixers From PHPDocToRealTypesPlugin: |
79 | - 'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string) |
|
80 | - 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) |
|
81 | - 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition |
|
82 | - 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition |
|
79 | + 'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string) |
|
80 | + 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) |
|
81 | + 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition |
|
82 | + 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition |
|
83 | 83 | |
84 | - 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences |
|
85 | - 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences |
|
86 | - 'PhanTypeMismatchArgument', // Not essential - 12300+ occurrences |
|
87 | - 'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences |
|
88 | - 'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences |
|
84 | + 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences |
|
85 | + 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences |
|
86 | + 'PhanTypeMismatchArgument', // Not essential - 12300+ occurrences |
|
87 | + 'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences |
|
88 | + 'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences |
|
89 | 89 | 'PhanPluginDuplicateAdjacentStatement', |
90 | - 'PhanPluginDuplicateConditionalTernaryDuplication', // 2750+ occurrences |
|
91 | - 'PhanPluginDuplicateConditionalNullCoalescing', // Not essential - 990+ occurrences |
|
92 | - 'PhanPluginRedundantAssignmentInGlobalScope', // Not essential, a lot of false warning |
|
93 | - 'PhanPluginRedundantAssignment', // Not essential, useless |
|
94 | - 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences |
|
90 | + 'PhanPluginDuplicateConditionalTernaryDuplication', // 2750+ occurrences |
|
91 | + 'PhanPluginDuplicateConditionalNullCoalescing', // Not essential - 990+ occurrences |
|
92 | + 'PhanPluginRedundantAssignmentInGlobalScope', // Not essential, a lot of false warning |
|
93 | + 'PhanPluginRedundantAssignment', // Not essential, useless |
|
94 | + 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences |
|
95 | 95 | ]; |
96 | 96 | |
97 | 97 | return $config; |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | 'bom' => 'Bom', |
84 | 84 | 'bookcal' => 'BookCal', |
85 | 85 | 'bookmark' => 'Bookmark', |
86 | - 'cashdesk' => null, // TODO: fill in proper class |
|
86 | + 'cashdesk' => null, // TODO: fill in proper class |
|
87 | 87 | 'category' => 'Categorie', |
88 | 88 | 'clicktodial' => 'ClickToDial', |
89 | 89 | 'collab' => 'Collab', |
90 | 90 | 'comptabilite' => 'Comptabilite', |
91 | - 'contact' => null, // TODO: fill in proper class |
|
91 | + 'contact' => null, // TODO: fill in proper class |
|
92 | 92 | 'contract' => 'Contrat', |
93 | 93 | 'cron' => 'Cron', |
94 | 94 | 'datapolicy' => 'DataPolicy', |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | 'don' => 'Don', |
101 | 101 | 'dynamicprices' => 'DynamicPrices', |
102 | 102 | 'ecm' => 'ECM', |
103 | - 'ecotax' => null, // TODO: External module ? |
|
103 | + 'ecotax' => null, // TODO: External module ? |
|
104 | 104 | 'emailcollector' => 'EmailCollector', |
105 | 105 | 'eventorganization' => 'EventOrganization', |
106 | 106 | 'expensereport' => 'ExpenseReport', |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | 'fournisseur' => 'Fournisseur', |
112 | 112 | 'ftp' => 'FTP', |
113 | 113 | 'geoipmaxmind' => 'GeoIPMaxmind', |
114 | - 'google' => null, // External ? |
|
114 | + 'google' => null, // External ? |
|
115 | 115 | 'gravatar' => 'Gravatar', |
116 | 116 | 'holiday' => 'Holiday', |
117 | 117 | 'hrm' => 'HRM', |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | 'ldap' => 'Ldap', |
126 | 126 | 'loan' => 'Loan', |
127 | 127 | 'mailing' => 'Mailing', |
128 | - 'mailman' => null, // Same module as mailmanspip -> MailmanSpip ?? |
|
128 | + 'mailman' => null, // Same module as mailmanspip -> MailmanSpip ?? |
|
129 | 129 | 'mailmanspip' => 'MailmanSpip', |
130 | 130 | 'margin' => 'Margin', |
131 | 131 | 'member' => 'Adherent', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'notification' => 'Notification', |
139 | 139 | 'numberwords' => null, // Not provided by default, no module tests |
140 | 140 | 'oauth' => 'Oauth', |
141 | - 'openstreetmap' => null, // External module? |
|
141 | + 'openstreetmap' => null, // External module? |
|
142 | 142 | 'opensurvey' => 'OpenSurvey', |
143 | 143 | 'order' => 'Commande', |
144 | 144 | 'partnership' => 'Partnership', |
@@ -165,8 +165,8 @@ discard block |
||
165 | 165 | 'stock' => 'Stock', |
166 | 166 | 'stocktransfer' => 'StockTransfer', |
167 | 167 | 'stripe' => 'Stripe', |
168 | - 'supplier_invoice' => null, // Special case, uses invoice |
|
169 | - 'supplier_order' => null, // Special case, uses invoice |
|
168 | + 'supplier_invoice' => null, // Special case, uses invoice |
|
169 | + 'supplier_order' => null, // Special case, uses invoice |
|
170 | 170 | 'supplier_proposal' => 'SupplierProposal', |
171 | 171 | 'syslog' => 'Syslog', |
172 | 172 | 'takepos' => 'TakePos', |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | // 'processes' => 6, |
229 | 229 | 'backward_compatibility_checks' => false, |
230 | 230 | 'simplify_ast' => true, |
231 | - 'analyzed_file_extensions' => ['php','inc'], |
|
231 | + 'analyzed_file_extensions' => ['php', 'inc'], |
|
232 | 232 | 'globals_type_map' => [ |
233 | 233 | 'action' => 'string', |
234 | 234 | 'actioncode' => 'string', |
@@ -273,12 +273,12 @@ discard block |
||
273 | 273 | 'menumanager' => '\MenuManager', |
274 | 274 | 'mysoc' => '\Societe', |
275 | 275 | 'nblines' => '\int', |
276 | - 'obj' => '\CommonObject', // Deprecated |
|
276 | + 'obj' => '\CommonObject', // Deprecated |
|
277 | 277 | 'object_rights' => 'int|stdClass', |
278 | 278 | 'objectoffield' => '\CommonObject', |
279 | 279 | 'senderissupplier' => 'int<0,2>', |
280 | 280 | 'user' => '\User', |
281 | - 'website' => 'string', // See discussion https://github.com/Dolibarr/dolibarr/pull/28891#issuecomment-2002268334 // Disable because Phan infers Website type |
|
281 | + 'website' => 'string', // See discussion https://github.com/Dolibarr/dolibarr/pull/28891#issuecomment-2002268334 // Disable because Phan infers Website type |
|
282 | 282 | 'websitepage' => '\WebSitePage', |
283 | 283 | 'websitepagefile' => 'string', |
284 | 284 | // 'object' => '\CommonObject', // Deprecated, not enabled because conflicts with $object assignments |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | // your application should be included in this list. |
303 | 303 | 'directory_list' => [ |
304 | 304 | 'htdocs', |
305 | - PHAN_DIR . '/stubs/', |
|
305 | + PHAN_DIR.'/stubs/', |
|
306 | 306 | ], |
307 | 307 | |
308 | 308 | // A directory list that defines files that will be excluded |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | 'htdocs/includes/', |
321 | 321 | 'htdocs/install/doctemplates/websites/', |
322 | 322 | 'htdocs/core/class/lessc.class.php', // External library |
323 | - PHAN_DIR . '/stubs/', |
|
323 | + PHAN_DIR.'/stubs/', |
|
324 | 324 | ], |
325 | 325 | //'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@', |
326 | 326 | 'exclude_file_regex' => '@^(' // @phpstan-ignore-line |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | .'|htdocs/includes/stripe/.*' // @phpstan-ignore-line |
336 | 336 | .'|htdocs/conf/conf.php' // @phpstan-ignore-line |
337 | 337 | // .'|htdocs/[^h].*/.*' // For testing @phpstan-ignore-line |
338 | - .')@', // @phpstan-ignore-line |
|
338 | + .')@', // @phpstan-ignore-line |
|
339 | 339 | |
340 | 340 | // A list of plugin files to execute. |
341 | 341 | // Plugins which are bundled with Phan can be added here by providing their name |
@@ -351,14 +351,14 @@ discard block |
||
351 | 351 | '/^isModEnabled$/' => [0, $moduleNameRegex, 'UnknownModuleName'], |
352 | 352 | // Note: trick to have different key for same regex: |
353 | 353 | '/^isModEnable[d]$/' => [0, $deprecatedModuleNameRegex, "DeprecatedModuleName"], |
354 | - '/^sanitizeVal$/' => [1, $sanitizeRegex,"UnknownSanitizeType"], |
|
355 | - '/^checkVal$/' => [1, $sanitizeRegex,"UnknownCheckValSanitizeType"], |
|
356 | - '/^\\\\ExtraFields::addExtraField$/' => [2, $extraFieldTypeRegex,"UnknownExtrafieldTypeBack"], |
|
357 | - '/^dol_now$/' => [0, '{^(?:auto|gmt|tz(?:server|ref|user(?:rel)?))$}',"InvalidDolNowArgument"], // '', 0, 1 match bool and int values |
|
358 | - '/^dol_mktime$/' => [6, '{^(?:|0|1|auto|gmt|tz(?:server|ref|user(?:rel)?|,[+a-zA-Z-/]+))$}',"InvalidDolMktimeArgument"], // '', 0, 1 match bool and int values |
|
359 | - '/^dol_print_date$/' => [2, '{^(?:|0|1|auto|gmt|tz(?:server|user(?:rel)?))$}',"InvalidDolMktimeArgument"], |
|
360 | - '/^GETPOSTFLOAT$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}',"InvalidGetPostFloatRounding"], |
|
361 | - '/^price2num$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}',"InvalidPrice2NumRounding"], |
|
354 | + '/^sanitizeVal$/' => [1, $sanitizeRegex, "UnknownSanitizeType"], |
|
355 | + '/^checkVal$/' => [1, $sanitizeRegex, "UnknownCheckValSanitizeType"], |
|
356 | + '/^\\\\ExtraFields::addExtraField$/' => [2, $extraFieldTypeRegex, "UnknownExtrafieldTypeBack"], |
|
357 | + '/^dol_now$/' => [0, '{^(?:auto|gmt|tz(?:server|ref|user(?:rel)?))$}', "InvalidDolNowArgument"], // '', 0, 1 match bool and int values |
|
358 | + '/^dol_mktime$/' => [6, '{^(?:|0|1|auto|gmt|tz(?:server|ref|user(?:rel)?|,[+a-zA-Z-/]+))$}', "InvalidDolMktimeArgument"], // '', 0, 1 match bool and int values |
|
359 | + '/^dol_print_date$/' => [2, '{^(?:|0|1|auto|gmt|tz(?:server|user(?:rel)?))$}', "InvalidDolMktimeArgument"], |
|
360 | + '/^GETPOSTFLOAT$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}', "InvalidGetPostFloatRounding"], |
|
361 | + '/^price2num$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}', "InvalidPrice2NumRounding"], |
|
362 | 362 | ], |
363 | 363 | 'plugins' => [ |
364 | 364 | __DIR__.'/plugins/NoVarDumpPlugin.php', |
@@ -419,39 +419,39 @@ discard block |
||
419 | 419 | // Dolibarr uses a lot of internal deprecated stuff, not reporting |
420 | 420 | 'PhanDeprecatedProperty', |
421 | 421 | |
422 | - 'PhanCompatibleNegativeStringOffset', // return false positive |
|
423 | - 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is |
|
424 | - 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time |
|
422 | + 'PhanCompatibleNegativeStringOffset', // return false positive |
|
423 | + 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is |
|
424 | + 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time |
|
425 | 425 | 'PhanTypeObjectUnsetDeclaredProperty', |
426 | - 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is |
|
427 | - 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is |
|
426 | + 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is |
|
427 | + 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is |
|
428 | 428 | |
429 | - 'PhanPluginWhitespaceTab', // Dolibarr used tabs |
|
430 | - 'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility |
|
431 | - 'PhanPluginShortArray', // Dolibarr uses array() |
|
432 | - 'PhanPluginShortArrayList', // Dolibarr uses array() |
|
429 | + 'PhanPluginWhitespaceTab', // Dolibarr used tabs |
|
430 | + 'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility |
|
431 | + 'PhanPluginShortArray', // Dolibarr uses array() |
|
432 | + 'PhanPluginShortArrayList', // Dolibarr uses array() |
|
433 | 433 | // Fixers From PHPDocToRealTypesPlugin: |
434 | - 'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string) |
|
435 | - 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) |
|
436 | - 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition |
|
437 | - 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition |
|
434 | + 'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string) |
|
435 | + 'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string) |
|
436 | + 'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition |
|
437 | + 'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition |
|
438 | 438 | |
439 | - 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences |
|
440 | - 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences |
|
441 | - 'PhanTypeMismatchArgument', // Not essential - 12300+ occurrences |
|
442 | - 'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences |
|
443 | - 'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences |
|
439 | + 'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences |
|
440 | + 'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences |
|
441 | + 'PhanTypeMismatchArgument', // Not essential - 12300+ occurrences |
|
442 | + 'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences |
|
443 | + 'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences |
|
444 | 444 | 'PhanPluginDuplicateAdjacentStatement', |
445 | - 'PhanPluginDuplicateConditionalTernaryDuplication', // 2750+ occurrences |
|
446 | - 'PhanPluginDuplicateConditionalNullCoalescing', // Not essential - 990+ occurrences |
|
447 | - 'PhanPluginRedundantAssignmentInGlobalScope', // Not essential, a lot of false warning |
|
448 | - 'PhanPluginRedundantAssignment', // Not essential, useless |
|
449 | - 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences |
|
445 | + 'PhanPluginDuplicateConditionalTernaryDuplication', // 2750+ occurrences |
|
446 | + 'PhanPluginDuplicateConditionalNullCoalescing', // Not essential - 990+ occurrences |
|
447 | + 'PhanPluginRedundantAssignmentInGlobalScope', // Not essential, a lot of false warning |
|
448 | + 'PhanPluginRedundantAssignment', // Not essential, useless |
|
449 | + 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences |
|
450 | 450 | |
451 | - 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled into config_extended only. |
|
452 | - 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled into config_extended only. |
|
453 | - 'PhanUndeclaredGlobalVariable', // Too many false positives on .tpl.php files. Is enabled into config_extended only. |
|
454 | - 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled into config_extended only. |
|
451 | + 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled into config_extended only. |
|
452 | + 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled into config_extended only. |
|
453 | + 'PhanUndeclaredGlobalVariable', // Too many false positives on .tpl.php files. Is enabled into config_extended only. |
|
454 | + 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled into config_extended only. |
|
455 | 455 | ], |
456 | 456 | // You can put relative paths to internal stubs in this config option. |
457 | 457 | // Phan will continue using its detailed type annotations, |
@@ -470,31 +470,31 @@ discard block |
||
470 | 470 | //'xdebug' => 'vendor/phan/phan/.phan/internal_stubs/xdebug.phan_php', |
471 | 471 | //'memcached' => PHAN_DIR . '/your_internal_stubs_folder_name/memcached.phan_php', |
472 | 472 | //'PDO' => PHAN_DIR . '/stubs/PDO.phan_php', |
473 | - 'brotli' => PHAN_DIR . '/stubs/brotli.phan_php', |
|
474 | - 'curl' => PHAN_DIR . '/stubs/curl.phan_php', |
|
475 | - 'calendar' => PHAN_DIR . '/stubs/calendar.phan_php', |
|
476 | - 'fileinfo' => PHAN_DIR . '/stubs/fileinfo.phan_php', |
|
477 | - 'ftp' => PHAN_DIR . '/stubs/ftp.phan_php', |
|
478 | - 'gd' => PHAN_DIR . '/stubs/gd.phan_php', |
|
479 | - 'geoip' => PHAN_DIR . '/stubs/geoip.phan_php', |
|
480 | - 'imagick' => PHAN_DIR . '/stubs/imagick.phan_php', |
|
481 | - 'imap' => PHAN_DIR . '/stubs/imap.phan_php', |
|
482 | - 'intl' => PHAN_DIR . '/stubs/intl.phan_php', |
|
483 | - 'ldap' => PHAN_DIR . '/stubs/ldap.phan_php', |
|
484 | - 'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php', |
|
485 | - 'memcache' => PHAN_DIR . '/stubs/memcache.phan_php', |
|
486 | - 'memcached' => PHAN_DIR . '/stubs/memcached.phan_php', |
|
487 | - 'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php', |
|
488 | - 'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php', |
|
489 | - 'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php', |
|
490 | - 'pdo_pgsql' => PHAN_DIR . '/stubs/pdo_pgsql.phan_php', |
|
491 | - 'pdo_sqlite' => PHAN_DIR . '/stubs/pdo_sqlite.phan_php', |
|
492 | - 'pgsql' => PHAN_DIR . '/stubs/pgsql.phan_php', |
|
493 | - 'session' => PHAN_DIR . '/stubs/session.phan_php', |
|
494 | - 'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php', |
|
495 | - 'soap' => PHAN_DIR . '/stubs/soap.phan_php', |
|
496 | - 'sockets' => PHAN_DIR . '/stubs/sockets.phan_php', |
|
497 | - 'tidy' => PHAN_DIR . '/stubs/tidy.phan_php', |
|
498 | - 'zip' => PHAN_DIR . '/stubs/zip.phan_php', |
|
473 | + 'brotli' => PHAN_DIR.'/stubs/brotli.phan_php', |
|
474 | + 'curl' => PHAN_DIR.'/stubs/curl.phan_php', |
|
475 | + 'calendar' => PHAN_DIR.'/stubs/calendar.phan_php', |
|
476 | + 'fileinfo' => PHAN_DIR.'/stubs/fileinfo.phan_php', |
|
477 | + 'ftp' => PHAN_DIR.'/stubs/ftp.phan_php', |
|
478 | + 'gd' => PHAN_DIR.'/stubs/gd.phan_php', |
|
479 | + 'geoip' => PHAN_DIR.'/stubs/geoip.phan_php', |
|
480 | + 'imagick' => PHAN_DIR.'/stubs/imagick.phan_php', |
|
481 | + 'imap' => PHAN_DIR.'/stubs/imap.phan_php', |
|
482 | + 'intl' => PHAN_DIR.'/stubs/intl.phan_php', |
|
483 | + 'ldap' => PHAN_DIR.'/stubs/ldap.phan_php', |
|
484 | + 'mcrypt' => PHAN_DIR.'/stubs/mcrypt.phan_php', |
|
485 | + 'memcache' => PHAN_DIR.'/stubs/memcache.phan_php', |
|
486 | + 'memcached' => PHAN_DIR.'/stubs/memcached.phan_php', |
|
487 | + 'mysqli' => PHAN_DIR.'/stubs/mysqli.phan_php', |
|
488 | + 'pdo_cubrid' => PHAN_DIR.'/stubs/pdo_cubrid.phan_php', |
|
489 | + 'pdo_mysql' => PHAN_DIR.'/stubs/pdo_mysql.phan_php', |
|
490 | + 'pdo_pgsql' => PHAN_DIR.'/stubs/pdo_pgsql.phan_php', |
|
491 | + 'pdo_sqlite' => PHAN_DIR.'/stubs/pdo_sqlite.phan_php', |
|
492 | + 'pgsql' => PHAN_DIR.'/stubs/pgsql.phan_php', |
|
493 | + 'session' => PHAN_DIR.'/stubs/session.phan_php', |
|
494 | + 'simplexml' => PHAN_DIR.'/stubs/SimpleXML.phan_php', |
|
495 | + 'soap' => PHAN_DIR.'/stubs/soap.phan_php', |
|
496 | + 'sockets' => PHAN_DIR.'/stubs/sockets.phan_php', |
|
497 | + 'tidy' => PHAN_DIR.'/stubs/tidy.phan_php', |
|
498 | + 'zip' => PHAN_DIR.'/stubs/zip.phan_php', |
|
499 | 499 | ], |
500 | 500 | ]; |