fix phpstan branch 21

This commit is contained in:
Frédéric France 2025-01-25 09:16:52 +01:00
parent fc7417b955
commit 01bb6b7d85
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
2 changed files with 6 additions and 12 deletions

View File

@ -3768,12 +3768,6 @@ parameters:
count: 2
path: ../../htdocs/comm/action/peruser.php
-
message: '#^Loose comparison using \=\= between ''show_peruser'' and ''show_peruser'' will always evaluate to true\.$#'
identifier: equal.alwaysTrue
count: 1
path: ../../htdocs/comm/action/peruser.php
-
message: '#^Loose comparison using \=\= between ''show_peruser'' and ''show_week'' will always evaluate to false\.$#'
identifier: equal.alwaysFalse

View File

@ -853,7 +853,7 @@ if ($resql) {
$event = new ActionComm($db);
$event->id = $obj->id;
$event->ref = $event->id;
$event->ref = (string) $event->id;
$event->fulldayevent = $obj->fulldayevent;
@ -1008,7 +1008,7 @@ if ($showbirthday) {
$event = new ActionComm($db);
$event->id = $obj->rowid; // We put contact id in action id for birthdays events
$event->ref = $event->id;
$event->ref = (string) $event->id;
$datebirth = dol_stringtotime($obj->birthday, 1);
//print 'ee'.$obj->birthday.'-'.$datebirth;
@ -1081,8 +1081,8 @@ if ($user->hasRight("holiday", "read")) {
$event = new ActionComm($db);
// Need the id of the leave object for link to it
$event->id = $obj->rowid;
$event->ref = $event->id;
$event->id = $obj->rowid;
$event->ref = (string) $event->id;
$event->type_code = 'HOLIDAY';
$event->type_label = '';
@ -1344,7 +1344,7 @@ if (count($listofextcals)) {
if ($addevent) {
$event->id = $icalevent['UID'];
$event->ref = $event->id;
$event->ref = (string) $event->id;
$userstatic = new User($db);
$userId = $userstatic->findUserIdByEmail($namecal);
if (!empty($userId) && $userId > 0) {
@ -1532,7 +1532,7 @@ while ($currentdaytoshow < $lastdaytoshow) {
echo '<tr class="liste_titre">';
echo '<td class="nopaddingtopimp nopaddingbottomimp nowraponsmartphone">';
if ($canedit && $mode == 'show_peruser') {
if ($canedit /* && $mode == 'show_peruser' */) { // mode is forced to show_peruser
// Filter on days
print '<span class="hideonsmartphone" title="'.$langs->trans("VisibleDaysRange").'">';
print img_picto('', 'clock', 'class="fawidth30 inline-block marginleftonly"');