qual: phptan for htdocs/product/class/product.class.php (#28121)

* qual: phptan for htdocs/product/class/html.formproduct.class.php	582

htdocs/product/class/html.formproduct.class.php	582	Method FormProduct::selectMeasuringUnits() should return string but returns int.
htdocs/product/class/html.formproduct.class.php	651	Method FormProduct::selectProductNature() should return string but returns int.

* phpcs
This commit is contained in:
thibdrev 2024-02-12 02:07:21 +01:00 committed by GitHub
parent c93905cf81
commit 1c0d58d9ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2360,8 +2360,8 @@ class Product extends CommonObject
}
} else {
$price = (float) price2num($newprice, 'MU');
$price_ttc = ($newnpr != 1) ? (float) price2num($newprice) * (1 + ($newvat / 100)) : $price;
$price_ttc = price2num($price_ttc, 'MU');
$price_ttc = ($newnpr != 1) ? price2num($newprice) * (1 + ($newvat / 100)) : $price;
$price_ttc = (float) price2num($price_ttc, 'MU');
if ($newminprice !== '' || $newminprice === 0) {
$price_min = price2num($newminprice, 'MU');
@ -6600,8 +6600,9 @@ class Product extends CommonObject
/**
* Return the duration in Hours of a service base on duration fields
* @return int -1 KO, >= 0 is the duration in hours
* Return the duration of a service in hours (for a service based on duration fields)
*
* @return float|-1 Duration in hours if OK, -1 if KO
*/
public function getProductDurationHours()
{