diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 975e4c02cb3..afbeba06cf2 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -1692,18 +1692,6 @@ parameters: count: 1 path: ../../../htdocs/bom/class/api_boms.class.php - - - message: '#^Call to function method_exists\(\) with \$this\(BOM\) and ''getLibStatut'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - - - message: '#^Call to function method_exists\(\) with \$this\(BOM\) and ''getNomUrl'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - message: '#^Method BOM\:\:getNetNeedsTree\(\) has parameter \$TNetNeeds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 1e51c7f148b..35aaf18c9ae 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -898,6 +898,7 @@ class BOM extends CommonObject $obj = new $classname(); '@phan-var-force ModeleNumRefBoms $obj'; + /** @var ModeleNumRefBoms $obj */ $numref = $obj->getNextValue($prod, $this); if ($numref != "") { @@ -1642,7 +1643,7 @@ class BOM extends CommonObject $return .= img_picto('', $this->picto); $return .= ''; $return .= '
'; - $return .= ''.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : '').''; + $return .= '' . $this->getNomUrl() . ''; if ($selected >= 0) { $return .= ''; } @@ -1659,9 +1660,7 @@ class BOM extends CommonObject $prod = $arraydata['prod']; $return .= '
'.$prod->getNomUrl(1).''; } - if (method_exists($this, 'getLibStatut')) { - $return .= '
'.$this->getLibStatut(3).'
'; - } + $return .= '
'.$this->getLibStatut(3).'
'; $return .= '
'; $return .= '';