forked from Wavyzz/dolibarr
fix ignored phpstan (#30643)
* fix ignored phpstan * fix ignored phpstan --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -1337,11 +1337,11 @@ class Product extends CommonObject
|
||||
// Automated compute surface and volume if not filled
|
||||
if (empty($this->surface) && !empty($this->length) && !empty($this->width) && $this->length_units == $this->width_units) {
|
||||
$this->surface = (float) $this->length * (float) $this->width;
|
||||
$this->surface_units = measuring_units_squared($this->length_units);
|
||||
$this->surface_units = measuring_units_squared((int) $this->length_units);
|
||||
}
|
||||
if (empty($this->volume) && !empty($this->surface) && !empty($this->height) && $this->length_units == $this->height_units) {
|
||||
$this->volume = $this->surface * (float) $this->height;
|
||||
$this->volume_units = measuring_units_cubed($this->height_units);
|
||||
$this->volume_units = measuring_units_cubed((int) $this->height_units);
|
||||
}
|
||||
|
||||
if (empty($this->tva_tx)) {
|
||||
|
||||
@@ -72,7 +72,6 @@ parameters:
|
||||
- '#expects int\|null#'
|
||||
- '#expects int<-2, 2>, bool given.#'
|
||||
- '#expects int<0, 1>#'
|
||||
- '#measu.* expects int, string#'
|
||||
- '#color.* expects int, string#'
|
||||
- '#imap.* expects int, string#'
|
||||
- '#dol.* expects int, string#'
|
||||
|
||||
Reference in New Issue
Block a user