fix phpstan

This commit is contained in:
Frédéric France 2025-02-03 18:42:04 +01:00
parent fb0083a3ec
commit 2794f53a10
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
5 changed files with 88 additions and 30 deletions

View File

@ -14760,12 +14760,6 @@ parameters:
count: 2
path: ../../../htdocs/core/tpl/extrafields_list_print_fields.tpl.php
-
message: '#^Variable \$object might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/core/tpl/extrafields_list_search_input.tpl.php
-
message: '#^Variable \$extrafields might not be defined\.$#'
identifier: variable.undefined
@ -14778,12 +14772,6 @@ parameters:
count: 2
path: ../../../htdocs/core/tpl/extrafields_list_search_param.tpl.php
-
message: '#^Variable \$object might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/core/tpl/extrafields_list_search_param.tpl.php
-
message: '#^Variable \$param might not be defined\.$#'
identifier: variable.undefined
@ -14802,30 +14790,12 @@ parameters:
count: 1
path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php
-
message: '#^Variable \$object might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php
-
message: '#^Variable \$sql might not be defined\.$#'
identifier: variable.undefined
count: 7
path: ../../../htdocs/core/tpl/extrafields_list_search_sql.tpl.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/core/tpl/extrafields_list_search_title.tpl.php
-
message: '#^Variable \$object might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/core/tpl/extrafields_list_search_title.tpl.php
-
message: '#^Variable \$param might not be defined\.$#'
identifier: variable.undefined

View File

@ -1,5 +1,28 @@
<?php
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* @var Conf $conf
* @var DoliDB $db
* @var CommonObject $object
*/
print '<!-- extrafields_list_search_input.tpl.php -->'."\n";
// Protection to avoid direct call of template

View File

@ -1,5 +1,27 @@
<?php
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* @var Conf $conf
* @var CommonObject $object
*/
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";

View File

@ -1,5 +1,27 @@
<?php
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* @var Conf $conf
* @var CommonObject $object
*/
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";

View File

@ -1,6 +1,27 @@
<?php
/* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* @var Conf $conf
* @var CommonObject $object
* @var ?Translate $langs
*/
// Protection to avoid direct call of template