fix phpstan

This commit is contained in:
Frédéric France 2024-12-03 22:03:22 +01:00
parent ba18151b91
commit 29a0eb4d30
No known key found for this signature in database
GPG key ID: CE25B0B7B53B9177
2 changed files with 8 additions and 8 deletions

View file

@ -24438,12 +24438,6 @@ parameters:
count: 1
path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php
-
message: '#^Variable \$object might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue

View file

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) ---Replace with your own copyright and developer email---
*
* This program is free software; you can redistribute it and/or modify
@ -17,6 +18,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* @var CommonObject $object
* @var Translate $langs
* @var User $user
*/
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";