clean code (#35419)

* clean code

* clean code
This commit is contained in:
Frédéric FRANCE 2025-09-21 15:32:34 +02:00 committed by GitHub
parent b783743b10
commit 86f20799bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 16 deletions

View file

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

View file

@ -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 .= '</span>';
$return .= '<div class="info-box-content">';
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : '').'</span>';
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl() . '</span>';
if ($selected >= 0) {
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
@ -1659,9 +1660,7 @@ class BOM extends CommonObject
$prod = $arraydata['prod'];
$return .= '<br><span class="info-box-label">'.$prod->getNomUrl(1).'</span>';
}
if (method_exists($this, 'getLibStatut')) {
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
}
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
$return .= '</div>';
$return .= '</div>';