Merge pull request #32437 from frederic34/fix_2024_12_19_20_38

fix phpstan
This commit is contained in:
Laurent Destailleur 2024-12-20 11:22:36 +01:00 committed by GitHub
commit a30f33fc69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 22 additions and 55 deletions

View file

@ -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

View file

@ -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
*/

View file

@ -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
@ -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)) {

View file

@ -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

View file

@ -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

View file

@ -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
@ -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)) {

View file

@ -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

View file

@ -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

View file

@ -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)) {

View file

@ -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)) {