From 2018e577b85cb0cb702ea140bcb8cfefd74a546f Mon Sep 17 00:00:00 2001 From: thibdrev Date: Thu, 1 Feb 2024 13:39:25 +0100 Subject: [PATCH] qual: phpstan for htdocs/adherents/class/adherent.class.php (#27945) * qual: phpstan for htdocs/adherents/class/adherent.class.php htdocs/adherents/class/adherent.class.php 1692 Property Adherent::$invoice (Facture) does not accept null. htdocs/adherents/class/adherent.class.php 2626 Property Adherent::$civility_id (string) does not accept int. * phpcs --- htdocs/adherents/class/adherent.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 90b1cec79a9..953c0b7b528 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -103,10 +103,17 @@ class Adherent extends CommonObject public $fullname; /** - * @var string The civility code, not an integer + * @var string + * @deprecated + * @see $civility_code */ public $civility_id; + + /** + * @var string The civility code, not an integer (ex: 'MR', 'MME', 'MLE', etc.) + */ public $civility_code; + public $civility; /** @@ -270,7 +277,7 @@ class Adherent extends CommonObject public $partnerships = array(); /** - * @var Facture To store the created invoice into subscriptionComplementaryActions() + * @var Facture|null To store the created invoice into subscriptionComplementaryActions() */ public $invoice; @@ -2623,7 +2630,7 @@ class Adherent extends CommonObject $this->ref = 'ABC001'; $this->entity = 1; $this->specimen = 1; - $this->civility_id = 0; + $this->civility_id = 'MR'; $this->lastname = 'DOLIBARR'; $this->firstname = 'SPECIMEN'; $this->gender = 'man';