diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index a00105a79b3..971443ca523 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -24864,18 +24864,6 @@ parameters: count: 1 path: ../../htdocs/product/canvas/product/actions_card_product.class.php - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/canvas/product/tpl/card_create.tpl.php - - - - message: '#^Variable \$refalreadyexists might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/canvas/product/tpl/card_create.tpl.php - - message: '#^Property ActionsCardService\:\:\$field_list has no type specified\.$#' identifier: missingType.property @@ -24888,30 +24876,6 @@ parameters: count: 1 path: ../../htdocs/product/canvas/service/actions_card_service.class.php - - - message: '#^Cannot access property \$control on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../htdocs/product/canvas/service/tpl/card_create.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/canvas/service/tpl/card_create.tpl.php - - - - message: '#^Variable \$refalreadyexists might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/product/canvas/service/tpl/card_create.tpl.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/product/canvas/service/tpl/card_create.tpl.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -30450,18 +30414,6 @@ parameters: count: 3 path: ../../htdocs/societe/canvas/company/tpl/card_view.tpl.php - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/societe/canvas/individual/tpl/card_create.tpl.php - - - - message: '#^Variable \$canvas might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/societe/canvas/individual/tpl/card_edit.tpl.php - - message: '#^Variable \$objcanvas might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6f47d171761..ef0e68c369e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1567,6 +1567,7 @@ function dol_get_object_properties($obj, $properties = []) * @param T $object Object to clone * @param int $native 0=Full isolation method, 1=Native PHP method, 2=Full isolation method keeping only scalar and array properties (recommended) * @return T Clone object + * * @see https://php.net/manual/language.oop5.cloning.php * @phan-suppress PhanTypeExpectedObjectPropAccess */ diff --git a/htdocs/product/canvas/product/tpl/card_create.tpl.php b/htdocs/product/canvas/product/tpl/card_create.tpl.php index 5e4621b24c1..1f750f1108a 100644 --- a/htdocs/product/canvas/product/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_create.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2010-2018 Regis Houssin + * Copyright (C) 2024 Frédéric France * * 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 @@ -16,10 +16,14 @@ * along with this program. If not, see . */ /** + * @var Canvas $this * @var Conf $conf * @var Form $form * @var Translate $langs * @var User $user + * + * @var string $canvas + * @var int $refalreadyexists */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { diff --git a/htdocs/product/canvas/product/tpl/card_edit.tpl.php b/htdocs/product/canvas/product/tpl/card_edit.tpl.php index b6a95262e0d..12482210934 100644 --- a/htdocs/product/canvas/product/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_edit.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2018 Regis Houssin * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/canvas/product/tpl/card_view.tpl.php b/htdocs/product/canvas/product/tpl/card_view.tpl.php index 3cf61f55d2f..e7b26f58762 100644 --- a/htdocs/product/canvas/product/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/product/tpl/card_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2018 Regis Houssin * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/canvas/service/tpl/card_create.tpl.php b/htdocs/product/canvas/service/tpl/card_create.tpl.php index 875b790e688..6266cdbda47 100644 --- a/htdocs/product/canvas/service/tpl/card_create.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_create.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2018 Regis Houssin * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -16,10 +16,14 @@ * along with this program. If not, see . */ /** + * @var Canvas $this * @var Conf $conf * @var Form $form * @var Translate $langs * @var User $user + * + * @var string $canvas + * @var int $refalreadyexists */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { diff --git a/htdocs/product/canvas/service/tpl/card_edit.tpl.php b/htdocs/product/canvas/service/tpl/card_edit.tpl.php index eb40955a200..a95415aac72 100644 --- a/htdocs/product/canvas/service/tpl/card_edit.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_edit.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2018 Regis Houssin * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/canvas/service/tpl/card_view.tpl.php b/htdocs/product/canvas/service/tpl/card_view.tpl.php index 2b48f913b0e..b5fd7372b39 100644 --- a/htdocs/product/canvas/service/tpl/card_view.tpl.php +++ b/htdocs/product/canvas/service/tpl/card_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2018 Regis Houssin * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index ebd3dcb6e01..0620678fc02 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -18,12 +18,15 @@ */ /** + * @var Canvas $this * @var Conf $conf * @var CommonObject $this * @var DoliDB $db * @var FormFile $formfile * @var Translate $langs * @var User $user + * + * @var string $canvas */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) { diff --git a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php index d21880eb303..3964a8a7491 100644 --- a/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_edit.tpl.php @@ -18,12 +18,15 @@ */ /** + * @var Canvas $this * @var Conf $conf * @var CommonObject $this * @var DoliDB $db * @var FormFile $formfile * @var Translate $langs * @var User $user + * + * @var string $canvas */ // Protection to avoid direct call of template if (empty($conf) || !is_object($conf)) {