diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index e8de39a6c99..8524e7ffce4 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -900,12 +900,6 @@ parameters: count: 1 path: ../../../htdocs/adherents/subscription/card.php - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/adherents/tpl/linkedobjectblock.tpl.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index cf9f00e9ebe..ec03893f049 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014 Marcos García - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ * along with this program. If not, see . */ /** - * @var Conf $conf + * @var ?Conf $conf * @var User $user */ // Protection to avoid direct call of template @@ -34,8 +34,13 @@ global $user; $langs = $GLOBALS['langs']; '@phan-var-force Translate $langs'; +/** + * @var Translate $langs + * @var CommonObject $object + */ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; '@phan-var-force Subscription[] $linkedObjectBlock'; +/** @var Subscription[] $linkedObjectBlock */ $langs->load("members"); $total = 0;