Skip to content

Commit

Permalink
Merge pull request #32437 from frederic34/fix_2024_12_19_20_38
Browse files Browse the repository at this point in the history
fix phpstan
  • Loading branch information
eldy authored Dec 20, 2024
2 parents 7cf1a05 + 7ba7a97 commit a30f33f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 55 deletions.
48 changes: 0 additions & 48 deletions build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
8 changes: 6 additions & 2 deletions htdocs/product/canvas/product/tpl/card_create.tpl.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 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
Expand All @@ -16,10 +16,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* @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)) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/canvas/product/tpl/card_edit.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/canvas/product/tpl/card_view.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
Expand Down
6 changes: 5 additions & 1 deletion htdocs/product/canvas/service/tpl/card_create.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
Expand All @@ -16,10 +16,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* @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)) {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/canvas/service/tpl/card_edit.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/canvas/service/tpl/card_view.tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 3 additions & 0 deletions htdocs/societe/canvas/individual/tpl/card_create.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
3 changes: 3 additions & 0 deletions htdocs/societe/canvas/individual/tpl/card_edit.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a30f33f

Please sign in to comment.