Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix & Enable PhanTypeInvalidPropertyName #29037

Merged
merged 13 commits into from
Mar 24, 2024
1 change: 1 addition & 0 deletions dev/tools/codespell/codespell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dolibar->dolibarr
dolibarrr->dolibarr
dollibar->dolibarr
dollibarr->dolibarr
extrafeild->extrafield
thoose->those
# fiche->card
mot de passe->password
Expand Down
4 changes: 2 additions & 2 deletions dev/tools/phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
'langs' => '\Translate',
'leftmenu' => 'string',
'mainmenu' => 'string',
'menumanager' => 'string',
'menumanager' => '\MenuManager',
'mysoc' => '\Societe',
'nblines' => '\int',
'obj' => '\CommonObject', // Deprecated
Expand Down Expand Up @@ -483,7 +483,7 @@
// 'PhanTypeInvalidRightOperandOfAdd',
// 'PhanPluginDescriptionlessCommentOnPrivateProperty',
// 'PhanUndeclaredVariableDim', // Array initialisation on undeclared var: $abc['x']='ab'
'PhanTypeInvalidPropertyName',
// 'PhanTypeInvalidPropertyName',
'PhanPluginDuplicateCatchStatementBody',
'PhanPluginUndeclaredVariableIsset',
// 'PhanTypeInvalidUnaryOperandIncOrDec',
Expand Down
2 changes: 1 addition & 1 deletion dev/tools/phan/config_extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
'dolibarr_main_data_root' => 'string',
'dolibarr_main_authentication' => 'string',
'dolibarr_main_demo' => 'string',
'menumanager' => 'string',
'menumanager' => '\MenuManager',
'errormsg' => 'string',
'form' => '\Form',
'object_rights' => 'int|stdClass',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2014 Florian Henry <[email protected]>
* Copyright (C) 2019 Frédéric France <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* 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
Expand Down Expand Up @@ -278,11 +279,11 @@ public function multiselectselectLanguage($htmlname = '', $selected_array = arra
}

/**
* Return multiselect list of entities for extrafeild type sellist
* Return multiselect list of entities for extrafield type sellist
*
* @param string $htmlname control name
* @param array $sqlqueryparam array
* @param array $selected_array array
* @param array<string,string> $sqlqueryparam array
* @param string[] $selected_array array
*
* @return string HTML combo
*/
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8786,8 +8786,8 @@ public static function selectArrayFilter($htmlname, $array, $id = '', $moreparam
* Show a multiselect form from an array. WARNING: Use this only for short lists.
*
* @param string $htmlname Name of select
* @param array $array Array(key=>value) or Array(key=>array('id'=>key, 'label'=>value, 'color'=> , 'picto'=> , 'labelhtml'=> ))
* @param array $selected Array of keys preselected
* @param array<string,string|array{id:string,label:string,color:string,picto:string,labelhtml:string}> $array Array(key=>value) or Array(key=>array('id'=>key, 'label'=>value, 'color'=> , 'picto'=> , 'labelhtml'=> ))
* @param string[] $selected Array of keys preselected
* @param int $key_in_label 1 to show key like in "[key] value"
* @param int $value_as_key 1 to use value as key
* @param string $morecss Add more css style
Expand Down
4 changes: 2 additions & 2 deletions htdocs/install/upgrade2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2778,9 +2778,9 @@ function migrate_project_task_actors($db, $langs, $conf)
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @param string $table Table name
* @param int $fk_source Id of element source
* @param string $fk_source Id of element source (name of field)
* @param string $sourcetype Type of element source
* @param int $fk_target Id of element target
* @param string $fk_target Id of element target
* @param string $targettype Type of element target
* @return void
*/
Expand Down
1 change: 1 addition & 0 deletions htdocs/reception/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* Copyright (C) 2005 Patrick Rouillon <[email protected]>
* Copyright (C) 2005-2011 Laurent Destailleur <[email protected]>
* Copyright (C) 2005-2012 Regis Houssin <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* 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
Expand Down
2 changes: 1 addition & 1 deletion htdocs/reception/dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
if ($origin == 'order_supplier' && $object->origin_object->id && (isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') || isModEnabled("supplier_order"))) {
$origin_id = $object->origin_object->id;
$objectsrc = new CommandeFournisseur($db);
$objectsrc->fetch($object->origin_object->id);
$objectsrc->fetch($origin_id);
}
}

Expand Down
1 change: 1 addition & 0 deletions htdocs/reception/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <[email protected]>
* Copyright (C) 2013 Cédric Salvador <[email protected]>
* Copyright (C) 2017 Ferran Marcet <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* 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
Expand Down
1 change: 1 addition & 0 deletions htdocs/reception/note.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2004-2008 Laurent Destailleur <[email protected]>
* Copyright (C) 2005-2012 Regis Houssin <[email protected]>
* Copyright (C) 2013 Florian Henry <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* 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
Expand Down
Loading