2
0
forked from Wavyzz/dolibarr

Phpstan fix (#28637)

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
This commit is contained in:
Frédéric FRANCE
2024-03-05 17:12:36 +01:00
committed by GitHub
parent bc2f527e41
commit a2c92f183c
3 changed files with 8 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> * Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -184,7 +185,7 @@ class FormAdmin
* @param string $htmlname Name of html select * @param string $htmlname Name of html select
* @param array $dirmenuarray Array of directories to scan * @param array $dirmenuarray Array of directories to scan
* @param string $moreattrib More attributes on html select tag * @param string $moreattrib More attributes on html select tag
* @return integer|null * @return integer|void
*/ */
public function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib = '') public function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib = '')
{ {

View File

@@ -7,7 +7,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat> * Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -335,7 +335,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/** /**
* @var string[] List of module class names that must be enabled if this module is enabled. e.g.: array('modAnotherModule', 'FR'=>'modYetAnotherModule') * @var array List of module class names that must be enabled if this module is enabled. e.g.: array('modAnotherModule', 'FR'=>'modYetAnotherModule')
* Another example : array('always'=>array("modBanque", "modFacture", "modProduct", "modCategorie"), 'FR'=>array('modBlockedLog'));
* @see $requiredby * @see $requiredby
*/ */
public $depends; public $depends;

View File

@@ -922,7 +922,7 @@ class Reception extends CommonObject
$this->ref = trim($this->ref); $this->ref = trim($this->ref);
} }
if (isset($this->entity)) { if (isset($this->entity)) {
$this->entity = trim($this->entity); $this->entity = (int) $this->entity;
} }
if (isset($this->ref_supplier)) { if (isset($this->ref_supplier)) {
$this->ref_supplier = trim($this->ref_supplier); $this->ref_supplier = trim($this->ref_supplier);
@@ -931,10 +931,10 @@ class Reception extends CommonObject
$this->socid = trim($this->socid); $this->socid = trim($this->socid);
} }
if (isset($this->fk_user_author)) { if (isset($this->fk_user_author)) {
$this->fk_user_author = trim($this->fk_user_author); $this->fk_user_author = (int) $this->fk_user_author;
} }
if (isset($this->fk_user_valid)) { if (isset($this->fk_user_valid)) {
$this->fk_user_valid = trim($this->fk_user_valid); $this->fk_user_valid = (int) $this->fk_user_valid;
} }
if (isset($this->shipping_method_id)) { if (isset($this->shipping_method_id)) {
$this->shipping_method_id = (int) $this->shipping_method_id; $this->shipping_method_id = (int) $this->shipping_method_id;