From 536004c898e240ce0d67fcc518f940da4c97880a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Mar 2024 10:43:51 +0100 Subject: [PATCH] Fix phpstan warnings --- htdocs/ticket/class/ticket.class.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 8f40a7c02ac..c40be3db94f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2419,18 +2419,16 @@ class Ticket extends CommonObject // Search template files $file = ''; $classname = ''; - $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/ticket/".$modele.'.php', 0); if (file_exists($file)) { - $filefound = 1; $classname = $modele; break; } } - if ($filefound) { + if ($classname) { $result = dol_include_once($reldir."core/modules/ticket/".$modele.'.php'); $modTicket = new $classname(); @@ -2992,11 +2990,9 @@ class Ticket extends CommonObject $array_receiver = array_merge($array_receiver, $this->getInfosTicketExternalContact(1)); } - $sendtocc = ""; + $sendtocc = ''; if ($send_internal_cc) { $sendtocc = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM'); - } else { - $sendtocc = ''; } $from = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM');