Qual: Fix phan notices (#31193)

# Qual: Fix phan notices

Fix phan notices in several classes that have UnknownObjectMethod calls and classes
that had notices in relation with these classes
This commit is contained in:
MDW
2024-09-30 10:05:24 +02:00
committed by GitHub
parent 1754ee61d5
commit 8236aed22f
42 changed files with 618 additions and 221 deletions

View File

@@ -3676,6 +3676,7 @@ abstract class CommonObject
$sql = "UPDATE ".$this->db->prefix().$this->table_element;
$sql .= " SET ref_ext = '".$this->db->escape($ref_ext)."'";
// @phan-suppress-next-line PhanUndeclaredProperty
$sql .= " WHERE ".(isset($this->table_rowid) ? $this->table_rowid : 'rowid')." = ".((int) $this->id);
dol_syslog(get_class($this)."::update_ref_ext", LOG_DEBUG);
@@ -4036,7 +4037,9 @@ abstract class CommonObject
}
// Add revenue stamp to total
// @phan-suppress-next-line PhanUndeclaredProperty
$this->total_ttc += isset($this->revenuestamp) ? $this->revenuestamp : 0;
// @phan-suppress-next-line PhanUndeclaredProperty
$this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0;
// Situations totals
@@ -5472,6 +5475,7 @@ abstract class CommonObject
//var_dump($line);
if (!empty($line->date_start)) {
// @phan-suppress-next-line PhanUndeclaredProperty
$date_start = $line->date_start;
} else {
$date_start = $line->date_debut_prevue;
@@ -5480,6 +5484,7 @@ abstract class CommonObject
}
}
if (!empty($line->date_end)) {
// @phan-suppress-next-line PhanUndeclaredProperty
$date_end = $line->date_end;
} else {
$date_end = $line->date_fin_prevue;