From b151bc16bb2aae6eb5ddb53b1d82d6db67c27877 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Wed, 24 Jan 2024 21:44:05 +0100 Subject: [PATCH 1/2] qual: phpstan for htdocs/compta/sociales/class/paymentsocialcontribution.class.php htdocs/compta/sociales/class/paymentsocialcontribution.class.php 535 Property PaymentSocialContribution::$fk_charge (int) does not accept string. htdocs/compta/sociales/class/paymentsocialcontribution.class.php 540 Property PaymentSocialContribution::$fk_typepaiement (int) does not accept string. htdocs/compta/sociales/class/paymentsocialcontribution.class.php 544 Property PaymentSocialContribution::$fk_bank (int) does not accept string. htdocs/compta/sociales/class/paymentsocialcontribution.class.php 545 Property PaymentSocialContribution::$fk_user_creat (int) does not accept string. htdocs/compta/sociales/class/paymentsocialcontribution.class.php 546 Property PaymentSocialContribution::$fk_user_modif (int) does not accept string. --- .../class/paymentsocialcontribution.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 40ac77d918b..306b552c1f3 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -531,19 +531,18 @@ class PaymentSocialContribution extends CommonObject public function initAsSpecimen() { $this->id = 0; - - $this->fk_charge = ''; + $this->fk_charge = 0; $this->datec = ''; $this->tms = ''; $this->datep = ''; $this->amount = ''; $this->fk_typepaiement = ''; - $this->num_payment = ''; + $this->num_payment = 0; $this->note_private = ''; $this->note_public = ''; - $this->fk_bank = ''; - $this->fk_user_creat = ''; - $this->fk_user_modif = ''; + $this->fk_bank = 0; + $this->fk_user_creat = 0; + $this->fk_user_modif = 0; } From c5dc8bbcb142f61641376f0f5f6aee101419452d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Jan 2024 02:20:18 +0100 Subject: [PATCH 2/2] Update paymentsocialcontribution.class.php --- .../sociales/class/paymentsocialcontribution.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 306b552c1f3..c777b7ee9c8 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -532,12 +532,12 @@ class PaymentSocialContribution extends CommonObject { $this->id = 0; $this->fk_charge = 0; - $this->datec = ''; - $this->tms = ''; - $this->datep = ''; - $this->amount = ''; + $this->datec = dol_now(); + $this->tms = dol_now(); + $this->datep = dol_now(); + $this->amount = 100; $this->fk_typepaiement = ''; - $this->num_payment = 0; + $this->num_payment = 'ABC123'; $this->note_private = ''; $this->note_public = ''; $this->fk_bank = 0;