diff --git a/dev/tools/phan/stubs/multicompany.php b/dev/tools/phan/stubs/multicompany.php index 0f2ba3b4e74..33c25d99c23 100644 --- a/dev/tools/phan/stubs/multicompany.php +++ b/dev/tools/phan/stubs/multicompany.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2024-2025 MDW * * Note: in this context Entity == Company. */ @@ -31,7 +31,7 @@ class ActionsMulticompany } /** - * @param string $entity + * @param int $entity * @return void */ public function getInfo($entity) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 79cff89f228..81fc746874d 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1,7 +1,7 @@ * Copyright (c) 2004-2015 Laurent Destailleur - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -55,7 +55,9 @@ class DolGraph private $_library; // Graphic library to use (jflot, chart, artichow) /** - * @var array Array of data + * @var array> Array of data + * @phpstan-var array + * @phan-var array */ public $data; // Data of graph: array(array('abs1',valA1,valB1), array('abs2',valA2,valB2), ...) /** @@ -364,7 +366,7 @@ class DolGraph /** * Set data * - * @param array $data Data + * @param array $data Data * @return void * @see draw_jflot() for syntax of data array */ diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 69730aaca51..fde4fd8e3f3 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -1,6 +1,7 @@ + * Copyright (C) 2025 MDW * * 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 @@ -53,12 +54,12 @@ class FormCron extends Form /** * Display On Off selector * - * @param string $htmlname Html control name - * @param integer $selected selected value - * @param integer $readonly Select is read only or not - * @return string HTML select field + * @param string $htmlname Html control name + * @param string $selected Selected value + * @param int<0,1> $readonly Select is read only or not + * @return string HTML select field */ - public function select_typejob($htmlname, $selected = 0, $readonly = 0) + public function select_typejob($htmlname, $selected = '', $readonly = 0) { // phpcs:enable global $langs; diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index 3964d67232d..aae89f8a135 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -1,5 +1,6 @@ + * Copyright (C) 2025 MDW * * 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 @@ -19,6 +20,9 @@ * @var Translate $langs * @var string $servicename */ +' +@phan-var-force string $servicename +'; // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index d01fb3a5f99..edfaae9154c 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2009-2010 Regis Houssin * Copyright (C) 2011-2024 Laurent Destailleur * Copyright (C) 2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024-2025 MDW * * 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 @@ -34,13 +34,25 @@ if (!defined('NOBROWSERNOTIF')) { * @var string $disabled * @var string $dol_url_root * @var string $focus_element - * @var string $mode + * @var string $mode Contains (list of) authentication methods - example "http","dolibarr","openid,dolibarr" * @var string $message * @var string $title * @var string $urllogo - * @var string $user + * @var User $user * @var string $username */ +' +@phan-var-force string $captcha +@phan-var-force string $disabled +@phan-var-force string $dol_url_root +@phan-var-force string $focus_element +@phan-var-force string $mode +@phan-var-force string $message +@phan-var-force string $title +@phan-var-force string $urllogo +@phan-var-force User $user +@phan-var-force string $username +'; // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; @@ -130,10 +142,10 @@ $(document).ready(function () {