From c36a03d7e085fc9ed538b51e24212985d92820c9 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 11 Mar 2024 17:40:27 +0100 Subject: [PATCH] Fix: Repeat fields typing in CommonClass children # Fix: Repeat fields typing in CommonClass children phpstan needs typing to be 'co-variant' and therefore typing must be repeated as the method is not to initialise the property in the constructor, but to override the proparty by a 'local' definition in the child class --- htdocs/societe/class/societe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index eedaa168c37..8150efa1be1 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -188,7 +188,7 @@ class Societe extends CommonObject */ /** - * @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,position:int,notnull:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?: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' => -2, 'noteditable' => 1, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id', 'css' => 'left'),