fix php warning in dolGraph class (#31911)

* fix php warning in dolGraph class

* remove useless test

---------

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
This commit is contained in:
Lucas Marcouiller 2024-11-15 23:06:54 +01:00 committed by GitHub
parent 615bc3143c
commit 0507db75b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -782,6 +782,9 @@ class DolGraph
{
// phpcs:enable
$max = $this->GetMaxValueInData();
if (!isset($max)) {
$max = 0;
}
if ($max != 0) {
$max++;
}
@ -792,9 +795,7 @@ class DolGraph
}
$res = 0;
if (is_numeric($max)) {
$res = ceil($max / $factor) * $factor;
}
$res = ceil($max / $factor) * $factor;
//print "max=".$max." res=".$res;
return (int) $res;