From 61e05a9fdea253ce3d7643a8b94462907879593d Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 15 Mar 2024 17:10:30 +0100 Subject: [PATCH] Fix Typing on $fields for 2nd class in file # Fix Typing on $fields for 2nd class in file This fixes the PHPstan notification for the $fields property of the second CommonObject subclass in the files. Example: 'PHPDoc type array of property BOMLine::$fields is not covariant with PHPDoc type array of overridden property CommonObject::$fields.' --- htdocs/bom/class/bom.class.php | 2 +- htdocs/contrat/class/contrat.class.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 1aa3f31ddae8a..1ed600f243397 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1714,7 +1714,7 @@ class BOMLine extends CommonObjectLine // BEGIN MODULEBUILDER PROPERTIES /** - * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'LineID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",), diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 6c9fc066666d8..6110150e731ec 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -290,17 +290,17 @@ class Contrat extends CommonObject /* * Signed by sender */ - CONST STATUS_SIGNED_SENDER = 1; + const STATUS_SIGNED_SENDER = 1; /* * Signed by receiver */ - CONST STATUS_SIGNED_RECEIVER = 2; + const STATUS_SIGNED_RECEIVER = 2; /* * Signed by all */ - CONST STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) + const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract) /** @@ -3148,7 +3148,7 @@ class ContratLigne extends CommonObjectLine // BEGIN MODULEBUILDER PROPERTIES /** - * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. + * @var array|string,position:int,notnull:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string}> Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),