From d910c408f8dd4a1461f9328975ce4ebbf0b9401d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 3 Dec 2023 13:38:59 +0100 Subject: [PATCH] fix phpstan --- htdocs/asset/class/asset.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index e6f8128aed8..bffbbc0e787 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1000,6 +1000,8 @@ class Asset extends CommonObject $nb_days_in_month = getDolGlobalString('ASSET_DEPRECIATION_DURATION_PER_MONTH') ? $conf->global->ASSET_DEPRECIATION_DURATION_PER_MONTH : 30; $period_amount = (double) price2num($depreciation_period_amount / $fields['duration'], 'MT'); $first_period_found = false; + // TODO fix declaration of $begin_period + // @phpstan-ignore-next-line $first_period_date = isset($begin_period) && $begin_period > $fiscal_period_start ? $begin_period : $fiscal_period_start; $ref_date_format = "%Y" . ($fields['duration_type'] == 1 || $fields['duration_type'] == 2 ? '-%m' : '') . ($fields['duration_type'] == 2 ? '-%d' : '');