From c10edc2396e7e74d946e3fc2e40bcaf3f42da43b Mon Sep 17 00:00:00 2001 From: thibdrev Date: Tue, 30 Jan 2024 22:24:24 +0100 Subject: [PATCH] qual: phpstan for htdocs/expensereport/class/expensereport.class.php htdocs/expensereport/class/expensereport.class.php 502 Property ExpenseReport::$fk_user_valid (int) does not accept string. htdocs/expensereport/class/expensereport.class.php 1692 Method ExpenseReport::getNextNumRef() should return string but returns int. htdocs/expensereport/class/expensereport.class.php 1696 Method ExpenseReport::getNextNumRef() should return string but returns int. --- htdocs/expensereport/class/expensereport.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index d3904027f41..da62de7ecfc 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -499,7 +499,7 @@ class ExpenseReport extends CommonObject // Clear fields $this->fk_user_creat = $user->id; $this->fk_user_author = $fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for. - $this->fk_user_valid = ''; + $this->fk_user_valid = 0; $this->date_create = ''; $this->date_creation = ''; $this->date_validation = ''; @@ -1653,7 +1653,7 @@ class ExpenseReport extends CommonObject /** * Return next reference of expense report not already used * - * @return string free ref + * @return string|int<-2,-1> free ref, or <0 if error */ public function getNextNumRef() {