Skip to content

Commit

Permalink
Qual: Force typing on variable fixing several phan notices
Browse files Browse the repository at this point in the history
# Qual: Force typing on variable fixing several phan notices

Forcing DolibarrModules on $objMod after assignment to fix typing checks
  • Loading branch information
mdeweerd committed Mar 10, 2024
1 parent 6d9e7b8 commit cc0fdaa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions htdocs/admin/modulehelp.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
</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();
Expand Down Expand Up @@ -116,6 +116,7 @@
if (class_exists($modName)) {
try {
$objMod = new $modName($db);
'@phan-var-force DolibarrModules $objMod';
$modNameLoaded[$modName] = $dir;

if (!$objMod->numero > 0 && $modName != 'modUser') {
Expand Down Expand Up @@ -235,7 +236,10 @@
}
$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];



Expand Down

0 comments on commit cc0fdaa

Please sign in to comment.