From fb0083a3ec147dbfa4ba025a69e98ba7929d4fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Mon, 3 Feb 2025 18:37:57 +0100 Subject: [PATCH] fix phpstan --- dev/build/phpstan/phpstan-baseline.neon | 18 ------------------ htdocs/core/tpl/commonfields_view.tpl.php | 2 +- htdocs/core/tpl/contacts.tpl.php | 4 +++- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 1fd9eb19e8c..788622de452 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -14670,30 +14670,12 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - message: '#^Variable \$conf might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - - - message: '#^Variable \$hookmanager might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/contacts.tpl.php - - message: '#^Variable \$action might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index cca11e95467..1eeb8603cc5 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 85413f255e1..3f4abfee8bb 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -2,7 +2,7 @@ /* Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2015-2016 Charlie BENKE - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -27,7 +27,9 @@ /** * @var ?CommonObject $object * @var ?CommonObject $objectsrc + * @var DoliDB $db * @var Form $form + * @var HookManager $hookmanager * @var Translate $langs * @var User $user * @var ?string $permission