From 3e023bffe9897f4c64a670cb00852fd44982f658 Mon Sep 17 00:00:00 2001 From: thibdrev Date: Tue, 30 Jan 2024 22:36:41 +0100 Subject: [PATCH] qual: phpstan for htdocs/expensereport/class/paymentexpensereport.class.php htdocs/expensereport/class/paymentexpensereport.class.php 137 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 143 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 293 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 299 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 308 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 311 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 314 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 503 Property PaymentExpenseReport::$fk_expensereport (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 508 Property PaymentExpenseReport::$fk_typepayment (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 511 Property PaymentExpenseReport::$fk_bank (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 512 Property PaymentExpenseReport::$fk_user_creat (int) does not accept string. htdocs/expensereport/class/paymentexpensereport.class.php 513 Property PaymentExpenseReport::$fk_user_modif (int) does not accept string. --- .../class/paymentexpensereport.class.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 2447f521620..7ffe3f3987d 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -134,13 +134,13 @@ class PaymentExpenseReport extends CommonObject // Clean parameters if (isset($this->fk_expensereport)) { - $this->fk_expensereport = trim($this->fk_expensereport); + $this->fk_expensereport = (int) $this->fk_expensereport; } if (isset($this->amount)) { $this->amount = trim($this->amount); } if (isset($this->fk_typepayment)) { - $this->fk_typepayment = trim($this->fk_typepayment); + $this->fk_typepayment = (int) $this->fk_typepayment; } if (isset($this->num_payment)) { $this->num_payment = trim($this->num_payment); @@ -290,13 +290,13 @@ class PaymentExpenseReport extends CommonObject // Clean parameters if (isset($this->fk_expensereport)) { - $this->fk_expensereport = trim($this->fk_expensereport); + $this->fk_expensereport = (int) $this->fk_expensereport; } if (isset($this->amount)) { $this->amount = trim($this->amount); } if (isset($this->fk_typepayment)) { - $this->fk_typepayment = trim($this->fk_typepayment); + $this->fk_typepayment = (int) $this->fk_typepayment; } if (isset($this->num_payment)) { $this->num_payment = trim($this->num_payment); @@ -305,13 +305,13 @@ class PaymentExpenseReport extends CommonObject $this->note = trim($this->note); } if (isset($this->fk_bank)) { - $this->fk_bank = trim($this->fk_bank); + $this->fk_bank = (int) $this->fk_bank; } if (isset($this->fk_user_creat)) { - $this->fk_user_creat = trim($this->fk_user_creat); + $this->fk_user_creat = (int) $this->fk_user_creat; } if (isset($this->fk_user_modif)) { - $this->fk_user_modif = trim($this->fk_user_modif); + $this->fk_user_modif = (int) $this->fk_user_modif; } @@ -500,17 +500,17 @@ class PaymentExpenseReport extends CommonObject { $this->id = 0; - $this->fk_expensereport = ''; + $this->fk_expensereport = 0; $this->datec = ''; $this->tms = ''; $this->datep = ''; $this->amount = ''; - $this->fk_typepayment = ''; + $this->fk_typepayment = 0; $this->num_payment = ''; $this->note = ''; - $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; }