Merge pull request #27938 from thibdrev/patch-8

qual: phpstan for htdocs/ticket/class/ticket.class.php
This commit is contained in:
Laurent Destailleur 2024-02-01 10:52:35 +01:00 committed by GitHub
commit bf9a3c0f0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -189,27 +189,27 @@ class Ticket extends CommonObject
/**
* @var int Creation date
*/
public $datec = '';
public $datec;
/**
* @var int Last modification date
*/
public $tms = '';
public $tms;
/**
* @var int Read date
*/
public $date_read = '';
public $date_read;
/**
* @var int Last message date
*/
public $date_last_msg_sent = '';
public $date_last_msg_sent;
/**
* @var int Close ticket date
*/
public $date_close = '';
public $date_close;
/**
* @var array cache_types_tickets
@ -446,7 +446,7 @@ class Ticket extends CommonObject
}
if (isset($this->progress)) {
$this->progress = trim($this->progress);
$this->progress = (int) $this->progress;
}
if (isset($this->timing)) {
@ -1004,7 +1004,7 @@ class Ticket extends CommonObject
}
if (isset($this->progress)) {
$this->progress = trim($this->progress);
$this->progress = (int) $this->progress;
}
if (isset($this->timing)) {
@ -1246,16 +1246,16 @@ class Ticket extends CommonObject
$this->message = 'Message of ticket';
$this->status = 0;
$this->resolution = '1';
$this->progress = '10';
$this->progress = 10;
//$this->timing = '30';
$this->type_code = 'TYPECODE';
$this->category_code = 'CATEGORYCODE';
$this->severity_code = 'SEVERITYCODE';
$this->datec = '';
$this->date_read = '';
$this->date_last_msg_sent = '';
$this->date_close = '';
$this->tms = '';
$this->datec = dol_now();
$this->date_read = dol_now();
$this->date_last_msg_sent = dol_now();
$this->date_close = dol_now();
$this->tms = dol_now();
return 1;
}