diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 5cd2e95de2878..84c8b7749607d 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -773,7 +773,7 @@ public function getCatsCpts($catid = 0) * * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @param int $active 1= active, 0=not active - * @return array|int Array of groups or -1 if error + * @return array|int Array of groups or -1 if error * @see getCatsCpts(), getCptsCat() */ public function getCats($categorytype = -1, $active = 1) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index efc5d68d6f72d..909bfded02a33 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2464,7 +2464,7 @@ public function loadFiscalPeriods($force = false, $mode = 'active') * Get list of fiscal period * * @param string $filter Filter - * @return array|int Return integer <0 if KO, Fiscal periods : [[id, date_start, date_end, label], ...] + * @return array|int Return integer <0 if KO, Fiscal periods : [[id, date_start, date_end, label], ...] */ public function getFiscalPeriods($filter = '') { diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index d24c833cb8545..5ce0f2042d7d7 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -47,7 +47,7 @@ // if we set another view list mode, we keep it (till we change one more time) if (GETPOSTISSET('mode')) { $mode = GETPOST('mode', 'alpha'); - if ($mode =='common' || $mode =='commonkanban') { + if ($mode == 'common' || $mode == 'commonkanban') { dolibarr_set_const($db, "MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT", $mode, 'chaine', 0, '', $conf->entity); } } else { @@ -78,18 +78,18 @@ } $familyinfo = array( - 'hr'=>array('position'=>'001', 'label'=>$langs->trans("ModuleFamilyHr")), - 'crm'=>array('position'=>'006', 'label'=>$langs->trans("ModuleFamilyCrm")), - 'srm'=>array('position'=>'007', 'label'=>$langs->trans("ModuleFamilySrm")), - 'financial'=>array('position'=>'009', 'label'=>$langs->trans("ModuleFamilyFinancial")), - 'products'=>array('position'=>'012', 'label'=>$langs->trans("ModuleFamilyProducts")), - 'projects'=>array('position'=>'015', 'label'=>$langs->trans("ModuleFamilyProjects")), - 'ecm'=>array('position'=>'018', 'label'=>$langs->trans("ModuleFamilyECM")), - 'technic'=>array('position'=>'021', 'label'=>$langs->trans("ModuleFamilyTechnic")), - 'portal'=>array('position'=>'040', 'label'=>$langs->trans("ModuleFamilyPortal")), - 'interface'=>array('position'=>'050', 'label'=>$langs->trans("ModuleFamilyInterface")), - 'base'=>array('position'=>'060', 'label'=>$langs->trans("ModuleFamilyBase")), - 'other'=>array('position'=>'100', 'label'=>$langs->trans("ModuleFamilyOther")), + 'hr' => array('position' => '001', 'label' => $langs->trans("ModuleFamilyHr")), + 'crm' => array('position' => '006', 'label' => $langs->trans("ModuleFamilyCrm")), + 'srm' => array('position' => '007', 'label' => $langs->trans("ModuleFamilySrm")), + 'financial' => array('position' => '009', 'label' => $langs->trans("ModuleFamilyFinancial")), + 'products' => array('position' => '012', 'label' => $langs->trans("ModuleFamilyProducts")), + 'projects' => array('position' => '015', 'label' => $langs->trans("ModuleFamilyProjects")), + 'ecm' => array('position' => '018', 'label' => $langs->trans("ModuleFamilyECM")), + 'technic' => array('position' => '021', 'label' => $langs->trans("ModuleFamilyTechnic")), + 'portal' => array('position' => '040', 'label' => $langs->trans("ModuleFamilyPortal")), + 'interface' => array('position' => '050', 'label' => $langs->trans("ModuleFamilyInterface")), + 'base' => array('position' => '060', 'label' => $langs->trans("ModuleFamilyBase")), + 'other' => array('position' => '100', 'label' => $langs->trans("ModuleFamilyOther")), ); $param = ''; @@ -360,7 +360,7 @@ // Search modules dirs $modulesdir = dolGetModulesDirs(); -$arrayofnatures = array('core'=>$langs->transnoentitiesnoconv("NativeModules"), 'external'=>$langs->transnoentitiesnoconv("External").' - ['.$langs->trans("AllPublishers").']'); +$arrayofnatures = array('core' => $langs->transnoentitiesnoconv("NativeModules"), 'external' => $langs->transnoentitiesnoconv("External").' - ['.$langs->trans("AllPublishers").']'); $arrayofwarnings = array(); // Array of warning each module want to show when activated $arrayofwarningsext = array(); // Array of warning each module want to show when we activate an external module $filename = array(); @@ -395,6 +395,7 @@ $res = include_once $dir.$file; // A class already exists in a different file will send a non catchable fatal error. if (class_exists($modName)) { $objMod = new $modName($db); + '@phan-var-force DolibarrModules $objMod'; $modNameLoaded[$modName] = $dir; if (!$objMod->numero > 0 && $modName != 'modUser') { dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR); @@ -443,6 +444,7 @@ } else { $familykey = $objMod->family; } + '@phan-var-force string $familykey'; // if not, phan considers $familykey may be null $moduleposition = ($objMod->module_position ? $objMod->module_position : '50'); if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) { @@ -603,10 +605,10 @@ $moreforfilter = '
'; $moreforfilter .= ''; $moreforfilter .= '
'; @@ -618,7 +620,7 @@ $moreforfilter .= '
'; if (getDolGlobalInt('MAIN_FEATURES_LEVEL')) { - $array_version = array('stable'=>$langs->transnoentitiesnoconv("Stable")); + $array_version = array('stable' => $langs->transnoentitiesnoconv("Stable")); if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 0) { $array_version['deprecated'] = $langs->trans("Deprecated"); } @@ -632,7 +634,7 @@ $moreforfilter .= $form->selectarray('search_version', $array_version, $search_version, $langs->transnoentitiesnoconv('Version'), 0, 0, '', 0, 0, 0, '', 'maxwidth150', 1); $moreforfilter .= '
'; } - $array_status = array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")); + $array_status = array('active' => $langs->transnoentitiesnoconv("Enabled"), 'disabled' => $langs->transnoentitiesnoconv("Disabled")); $moreforfilter .= '
'; $moreforfilter .= $form->selectarray('search_status', $array_status, $search_status, $langs->transnoentitiesnoconv('Status'), 0, 0, '', 0, 0, 0, '', 'maxwidth150', 1); $moreforfilter .= '
'; @@ -717,7 +719,7 @@ || ($moduledesc && preg_match('/'.preg_quote($search_keyword, '/').'/i', $moduledesc)) || ($moduledesclong && preg_match('/'.preg_quote($search_keyword, '/').'/i', $moduledesclong)) || ($moduleauthor && preg_match('/'.preg_quote($search_keyword, '/').'/i', $moduleauthor)) - ) { + ) { $qualified = 1; } if (!$qualified) { diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 72bb5428b758c..21fa04cc9316e 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -231,7 +231,7 @@ //$calcmode.='
('.$langs->trans("SeeReportInDueDebtMode",'','').')'; //$calcmode.='
('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); - $arraylist = array('no'=>$langs->trans("None"), 'yes'=>$langs->trans("AccountWithNonZeroValues"), 'all'=>$langs->trans("All")); + $arraylist = array('no' => $langs->trans("None"), 'yes' => $langs->trans("AccountWithNonZeroValues"), 'all' => $langs->trans("All")); $period .= '     '.$langs->trans("DetailBy").' '.$form->selectarray('showaccountdetail', $arraylist, $showaccountdetail, 0); $periodlink = $textprevyear.$textnextyear; $exportlink = ''; @@ -240,7 +240,7 @@ $builddate = dol_now(); } -report_header($name, '', $period, $periodlink ?? '', $description, $builddate, $exportlink ?? '', array('modecompta'=>$modecompta, 'action' => ''), $calcmode); +report_header($name, '', $period, $periodlink ?? '', $description, $builddate, $exportlink ?? '', array('modecompta' => $modecompta, 'action' => ''), $calcmode); if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') { @@ -356,6 +356,9 @@ print ''.price($r).''; } + if (!isset($sommes[$code])) { + $sommes[$code] = array(); + } // Year N $code = $cat['code']; // code of categorie ('VTE', 'MAR', ...) if (empty($sommes[$code]['NP'])) { @@ -438,6 +441,9 @@ foreach ($months as $k => $v) { $totCat['M'][$k] = 0; } + if (!isset($sommes[$code])) { + $sommes[$code] = array(); + } // Set $cpts with array of accounts in the category/group $cpts = $AccCat->getCptsCat($cat['rowid']); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index ff537ee789112..b4cf054717ad7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -138,8 +138,9 @@ abstract class CommonObject */ public $array_options = array(); + /** - * @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(); @@ -775,7 +776,7 @@ abstract class CommonObject public $extraparams = array(); /** - * @var array List of child tables. To test if we can delete object. + * @var array List of child tables. To test if we can delete object. */ protected $childtables = array(); diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index ba63bba320eb9..9e32529e9b19b 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -296,7 +296,7 @@ protected function _Get_Height_Chars($pt) * protected Set format * * @param TCPDF $pdf PDF reference - * @param string $format Format + * @param array{metric:string,name:string,code:string,marginLeft:float,marginTip:float,SpaceX:float,SpaceY:float,NX:int,NY:int,width:float,height:float,font-size:float} $format Format * @return void */ protected function _Set_Format(&$pdf, $format) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a7b6cc9ac22a4..deb021bb0bccb 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -44,12 +44,12 @@ class ExtraFields public $db; /** - * @var array New array to store extrafields definition + * @var array,type:array,size:array,default:array,computed:array,unique:array,required:array,param:array,perms:array,list:array,totalizable:array,help:array,printable:array,enabled:array,langfile:array,css:array,csslist:array,hidden:array,mandatoryfieldsofotherentities:array,isameasure?:array}> New array to store extrafields definition */ public $attributes; /** - * @var array Array with boolean of status of groups + * @var array Array with boolean of status of groups */ public $expand_display; @@ -69,25 +69,25 @@ class ExtraFields public $errno; /** - * @var array Array of type to label + * @var array Array of type to label */ public static $type2label = array( - 'varchar'=>'String1Line', - 'text'=>'TextLongNLines', - 'html'=>'HtmlText', - 'int'=>'Int', - 'double'=>'Float', - 'date'=>'Date', - 'datetime'=>'DateAndTime', + 'varchar' => 'String1Line', + 'text' => 'TextLongNLines', + 'html' => 'HtmlText', + 'int' => 'Int', + 'double' => 'Float', + 'date' => 'Date', + 'datetime' => 'DateAndTime', //'datetimegmt'=>'DateAndTimeUTC', - 'boolean'=>'Boolean', - 'price'=>'ExtrafieldPrice', - 'pricecy'=>'ExtrafieldPriceWithCurrency', - 'phone'=>'ExtrafieldPhone', - 'mail'=>'ExtrafieldMail', - 'url'=>'ExtrafieldUrl', - 'ip'=>'ExtrafieldIP', - 'icon'=>'Icon', + 'boolean' => 'Boolean', + 'price' => 'ExtrafieldPrice', + 'pricecy' => 'ExtrafieldPriceWithCurrency', + 'phone' => 'ExtrafieldPhone', + 'mail' => 'ExtrafieldMail', + 'url' => 'ExtrafieldUrl', + 'ip' => 'ExtrafieldIP', + 'icon' => 'Icon', 'password' => 'ExtrafieldPassword', 'select' => 'ExtrafieldSelect', 'sellist' => 'ExtrafieldSelectList', @@ -253,9 +253,9 @@ private function create($attrname, $type = 'varchar', $length = '255', $elementt } } $field_desc = array( - 'type'=>$typedb, - 'value'=>$lengthdb, - 'null'=>($required ? 'NOT NULL' : 'NULL'), + 'type' => $typedb, + 'value' => $lengthdb, + 'null' => ($required ? 'NOT NULL' : 'NULL'), 'default' => $default_value ); @@ -602,11 +602,11 @@ public function update($attrname, $label, $type, $length, $elementtype, $unique $typedb = $type; $lengthdb = $length; } - $field_desc = array('type'=>$typedb, 'value'=>$lengthdb, 'null'=>($required ? 'NOT NULL' : 'NULL'), 'default'=>$default); + $field_desc = array('type' => $typedb, 'value' => $lengthdb, 'null' => ($required ? 'NOT NULL' : 'NULL'), 'default' => $default); if (is_object($hookmanager)) { $hookmanager->initHooks(array('extrafieldsdao')); - $parameters = array('field_desc'=>&$field_desc, 'table'=>$table, 'attr_name'=>$attrname, 'label'=>$label, 'type'=>$type, 'length'=>$length, 'unique'=>$unique, 'required'=>$required, 'pos'=>$pos, 'param'=>$param, 'alwayseditable'=>$alwayseditable, 'perms'=>$perms, 'list'=>$list, 'help'=>$help, 'default'=>$default, 'computed'=>$computed, 'entity'=>$entity, 'langfile'=>$langfile, 'enabled'=>$enabled, 'totalizable'=>$totalizable, 'printable'=>$printable); + $parameters = array('field_desc' => &$field_desc, 'table' => $table, 'attr_name' => $attrname, 'label' => $label, 'type' => $type, 'length' => $length, 'unique' => $unique, 'required' => $required, 'pos' => $pos, 'param' => $param, 'alwayseditable' => $alwayseditable, 'perms' => $perms, 'list' => $list, 'help' => $help, 'default' => $default, 'computed' => $computed, 'entity' => $entity, 'langfile' => $langfile, 'enabled' => $enabled, 'totalizable' => $totalizable, 'printable' => $printable); $reshook = $hookmanager->executeHooks('updateExtrafields', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -1078,24 +1078,24 @@ public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $ $out =''; $out.=''; */ - $out.= ''; + $out .= ''; if (getDolGlobalInt('MAIN_ADD_ICONPICKER_JS')) { - $out.=''; + $options .= "footer: '
',"; + $options .= "search: 'trans("TypeToFilter")."\" />',"; + $options .= "popover: '
"; + $options .= "
"; + $options .= "
"; + $options .= "
"; + $options .= "
'}}"; + $out .= "$('#".$keyprefix.$key.$keysuffix."').iconpicker(".$options.");"; + $out .= ''; } } elseif ($type == 'text') { if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field @@ -1598,7 +1598,7 @@ public function showInputField($key, $value, $moreparam = '', $keysuffix = '', $ $element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element if ($element == 'socpeople') { $element = 'contact'; - } elseif ( $element == 'projet' ) { + } elseif ($element == 'projet') { $element = 'project'; } @@ -2029,13 +2029,13 @@ public function showSeparator($key, $object, $colspan = 2, $display_type = 'card { global $conf, $langs; - $tagtype='tr'; - $tagtype_dyn='td'; + $tagtype = 'tr'; + $tagtype_dyn = 'td'; - if ($display_type=='line') { - $tagtype='div'; - $tagtype_dyn='span'; - $colspan=0; + if ($display_type == 'line') { + $tagtype = 'div'; + $tagtype_dyn = 'span'; + $colspan = 0; } $extrafield_param = $this->attributes[$object->table_element]['param'][$key]; diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index 6b93331127e12..f87766fff948c 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -28,6 +28,11 @@ */ class Menu { + /** + * List of menu items + * + * @var array,target:string,mainmenu:string,leftmenu:string,position:int,id:string,idsel:string,classname:string,prefix:string}> + */ public $liste; /** @@ -67,7 +72,7 @@ public function clear() */ public function add($url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '') { - $this->liste[] = array('url'=>$url, 'titre'=>$titre, 'level'=>$level, 'enabled'=>$enabled, 'target'=>$target, 'mainmenu'=>$mainmenu, 'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix); + $this->liste[] = array('url' => $url, 'titre' => $titre, 'level' => $level, 'enabled' => $enabled, 'target' => $target, 'mainmenu' => $mainmenu, 'leftmenu' => $leftmenu, 'position' => $position, 'id' => $id, 'idsel' => $idsel, 'classname' => $classname, 'prefix' => $prefix); } /** @@ -91,7 +96,7 @@ public function add($url, $titre, $level = 0, $enabled = 1, $target = '', $mainm public function insert($idafter, $url, $titre, $level = 0, $enabled = 1, $target = '', $mainmenu = '', $leftmenu = '', $position = 0, $id = '', $idsel = '', $classname = '', $prefix = '') { $array_start = array_slice($this->liste, 0, ($idafter + 1)); - $array_new = array(0=>array('url'=>$url, 'titre'=>$titre, 'level'=>$level, 'enabled'=>$enabled, 'target'=>$target, 'mainmenu'=>$mainmenu, 'leftmenu'=>$leftmenu, 'position'=>$position, 'id'=>$id, 'idsel'=>$idsel, 'classname'=>$classname, 'prefix'=>$prefix)); + $array_new = array(0 => array('url' => $url, 'titre' => $titre, 'level' => $level, 'enabled' => $enabled, 'target' => $target, 'mainmenu' => $mainmenu, 'leftmenu' => $leftmenu, 'position' => $position, 'id' => $id, 'idsel' => $idsel, 'classname' => $classname, 'prefix' => $prefix)); $array_end = array_slice($this->liste, ($idafter + 1)); $this->liste = array_merge($array_start, $array_new, $array_end); } diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 138417df261b6..150414b3c4df7 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -100,7 +100,7 @@ class SMTPs /** * Message Content * - * @var array $_msgContent Array of messages + * @var array{html?:array{mimeType:string,data:string,dataText:string,md5?:string},plain?:array{mimeType:string,data:string,dataText:string,md5?:string},image:array,attachment:array} $msgContent Array of messages */ private $_msgContent = array(); diff --git a/htdocs/core/lib/customreports.lib.php b/htdocs/core/lib/customreports.lib.php index 1359fae99a19c..b4011bf0c0edb 100644 --- a/htdocs/core/lib/customreports.lib.php +++ b/htdocs/core/lib/customreports.lib.php @@ -101,6 +101,7 @@ function fillArrayOfMeasures($object, $tablealias, $labelofobject, &$arrayofmesu if (!empty($object->isextrafieldmanaged) && isset($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if (!empty($extrafields->attributes[$object->table_element]['totalizable'][$key]) && (!isset($extrafields->attributes[$object->table_element]['enabled'][$key]) || (int) dol_eval($extrafields->attributes[$object->table_element]['enabled'][$key], 1, 1, '1'))) { + // @phan-suppress-next-line PhanTypeMismatchDimAssignment $position = (!empty($val['position']) ? $val['position'] : 0); $arrayofmesures[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-sum'] = array( 'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').$labelofobject.': '.$langs->trans($extrafields->attributes[$object->table_element]['label'][$key]).' ('.$langs->trans("Sum").')', diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6c8152bd2288e..e9c2a555d63d4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -682,7 +682,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null { global $mysoc, $user, $conf; - if (empty($paramname)) { + if (empty($paramname)) { // Explicit test for null for phan. return 'BadFirstParameterForGETPOST'; } if (empty($check)) { @@ -874,6 +874,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null // Substitution variables for GETPOST (used to get final url with variable parameters or final default value, when using variable parameters __XXX__ in the GET URL) // Example of variables: __DAY__, __MONTH__, __YEAR__, __MYCOMPANY_COUNTRY_ID__, __USER_ID__, ... // We do this only if var is a GET. If it is a POST, may be we want to post the text with vars as the setup text. + '@phan-var-force string $paramname'; if (!is_array($out) && empty($_POST[$paramname]) && empty($noreplace)) { $reg = array(); $maxloop = 20; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index d98127a6e5962..9b273e4f1b4ca 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -69,7 +69,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it public $family; /** - * @var array Custom family information + * @var array Custom family information * @see $family * * e.g.: @@ -140,7 +140,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it public $menu = array(); /** - * @var array Module parts + * @var array{triggers:int,login:int,substitutions:int,menus:int,theme:int,tpl:int,barcode:int,models:int,css:string,js:string,hooks:string[]} Module parts * array( * // Set this to 1 if module has its own trigger directory (/mymodule/core/triggers) * 'triggers' => 0, @@ -691,7 +691,7 @@ public function getDescLong() include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - $content=''; + $content = ''; $pathoffile = $this->getDescLongReadmeFound(); if ($pathoffile) { // Mostly for external modules @@ -801,7 +801,7 @@ public function getChangeLog() if ((float) DOL_VERSION >= 6.0) { @include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php'; - $content = dolMd2Html($content, 'parsedown', array('doc/'=>dol_buildpath(strtolower($this->name).'/doc/', 1))); + $content = dolMd2Html($content, 'parsedown', array('doc/' => dol_buildpath(strtolower($this->name).'/doc/', 1))); } else { $content = nl2br($content); } @@ -2493,7 +2493,7 @@ public function getKanbanView($codeenabledisable = '', $codetoconfig = '') if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { $versionTitle = $langs->trans("Version").' '.$this->getVersion(1); if ($this->needUpdate) { - $versionTitle.= '
'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; + $versionTitle .= '
'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; } $return .= ''; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index eb5675e23be20..763382fd70c75 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -2184,6 +2184,7 @@ public function loadTimeSpentMonth($datestart, $taskid = 0, $userid = 0) $date = explode('-', $obj->element_date); $week_number = getWeekNumber($date[2], $date[1], $date[0]); } + '@phan-var-force int $week_number'; // Needed because phan considers it might be null if (empty($weekalreadyfound[$week_number])) { $this->monthWorkLoad[$week_number] = $obj->element_duration; $this->monthWorkLoadPerTask[$week_number][$obj->fk_element] = $obj->element_duration; diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index 6dd506f02a731..750db8b0484e2 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -174,9 +174,6 @@ $langs->setDefaultLang('auto'); } -$bc[false] = ' class="bg1"'; -$bc[true] = ' class="bg2"'; - /** * Load conf file (file must exists)