From 9aec1a41feec520208c900482eb5496ffbfb9774 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Sat, 3 Feb 2024 14:37:17 +0100 Subject: [PATCH] qual: phpstan for htdocs/compta/paiement/class/cpaiement.class.php (#27981) htdocs/compta/paiement/class/cpaiement.class.php 98 Property Cpaiement::$active (int) does not accept string. htdocs/compta/paiement/class/cpaiement.class.php 253 Property Cpaiement::$active (int) does not accept string. htdocs/compta/paiement/class/cpaiement.class.php 373 Property Cpaiement::$active (int) does not accept string. --- htdocs/compta/paiement/class/cpaiement.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/paiement/class/cpaiement.class.php b/htdocs/compta/paiement/class/cpaiement.class.php index b8a4bb77c64..7dc738d2a00 100644 --- a/htdocs/compta/paiement/class/cpaiement.class.php +++ b/htdocs/compta/paiement/class/cpaiement.class.php @@ -95,7 +95,7 @@ class Cpaiement extends CommonDict $this->type = trim($this->type); } if (isset($this->active)) { - $this->active = trim($this->active); + $this->active = (int) $this->active; } if (isset($this->accountancy_code)) { $this->accountancy_code = trim($this->accountancy_code); @@ -250,7 +250,7 @@ class Cpaiement extends CommonDict $this->type = trim($this->type); } if (isset($this->active)) { - $this->active = trim($this->active); + $this->active = (int) $this->active; } if (isset($this->accountancy_code)) { $this->accountancy_code = trim($this->accountancy_code); @@ -365,12 +365,11 @@ class Cpaiement extends CommonDict public function initAsSpecimen() { $this->id = 0; - $this->code = ''; $this->libelle = ''; $this->label = ''; $this->type = ''; - $this->active = ''; + $this->active = 0; $this->accountancy_code = ''; $this->module = ''; }