Qual: Force typing on variable fixing several phan notices (#28740)

* Qual: Force typing on variable fixing several phan notices

# Qual: Force typing on variable fixing several phan notices

Forcing DolibarrModules on $objMod after assignment to fix typing checks

* Qual: Fix typing on import_label/export_label
This commit is contained in:
MDW
2024-03-11 12:56:55 +01:00
committed by GitHub
parent 8602ca9885
commit aee0509473
2 changed files with 8 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ print '<!-- Force style container -->'."\n".'<style>
}
</style>';
$arrayofnatures = array('core'=>$langs->transnoentitiesnoconv("Core"), 'external'=>$langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
$arrayofnatures = array('core' => $langs->transnoentitiesnoconv("Core"), 'external' => $langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
// Search modules dirs
$modulesdir = dolGetModulesDirs();
@@ -116,6 +116,7 @@ foreach ($modulesdir as $dir) {
if (class_exists($modName)) {
try {
$objMod = new $modName($db);
'@phan-var-force DolibarrModules $objMod';
$modNameLoaded[$modName] = $dir;
if (!$objMod->numero > 0 && $modName != 'modUser') {
@@ -235,7 +236,10 @@ foreach ($orders as $tmpkey => $tmpvalue) {
}
$value = $orders[$key];
$tab = explode('_', $value);
$familyposition = $tab[0]; $familykey = $tab[1]; $module_position = $tab[2]; $numero = $tab[3];
$familyposition = $tab[0];
$familykey = $tab[1];
$module_position = $tab[2];
$numero = $tab[3];