fix phpstan

This commit is contained in:
Frédéric France 2024-12-14 13:32:42 +01:00
parent a0e3f617e8
commit 2d6389873a
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
3 changed files with 10 additions and 52 deletions

View File

@ -2562,42 +2562,12 @@ parameters:
count: 1
path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 7
path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php
-
message: '#^Variable \$parameters might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/asset/tpl/depreciation_options_view.tpl.php
-
message: '#^Unable to resolve the template type T in call to function dol_sort_array$#'
identifier: argument.templateType
count: 1
path: ../../htdocs/asset/tpl/depreciation_view.tpl.php
-
message: '#^Variable \$assetdepreciationoptions might not be defined\.$#'
identifier: variable.undefined
count: 7
path: ../../htdocs/asset/tpl/depreciation_view.tpl.php
-
message: '#^Variable \$db might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/asset/tpl/depreciation_view.tpl.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 7
path: ../../htdocs/asset/tpl/depreciation_view.tpl.php
-
message: '#^Variable \$parameters might not be defined\.$#'
identifier: variable.undefined
@ -2856,18 +2826,6 @@ parameters:
count: 1
path: ../../htdocs/bom/tpl/objectline_edit.tpl.php
-
message: '#^Variable \$hookmanager might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/bom/tpl/objectline_edit.tpl.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../htdocs/bom/tpl/objectline_edit.tpl.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
@ -2880,12 +2838,6 @@ parameters:
count: 1
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
-
message: '#^Variable \$action might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../htdocs/bom/tpl/objectline_view.tpl.php
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -30,6 +30,7 @@
* @var Form $form
* @var HookManager $hookmanager
* @var AssetDepreciationOptions $assetdepreciationoptions
* @var Translate $langs
*/
'
@phan-var-force ?Form $form

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2021 Open-Dsi <support@open-dsi.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -27,8 +27,13 @@
*/
/**
* @var AssetDepreciationOptions $assetdepreciationoptions
* @var DoliDB $db
* @var Form $form
* @var HookManager $hookmanager
* @var Translate $langs
*
* @var string $action
*/
// Protection to avoid direct call of template