Implicit conversion from `float` to `int` when using `getPrayTime()` method
DrAliRagab opened this issue · comments
When using $arabic->getPrayTime()
, I got this warning.
I think this is because these 3 lines:
$g = $g % 360 + ($g - ceil($g) + 1);
$q = $q % 360 + ($q - ceil($q) + 1);
$L = $L % 360 + ($L - ceil($L) + 1);
As php documentation says "Operands of modulo are converted to int before processing. For floating-point modulo, see fmod()
"
Arithmetic Operators
We can use fmod()
function
fmod
$g = fmod($g, 360) + ($g - ceil($g) + 1);
$q = fmod($q, 360) + ($q - ceil($q) + 1);
$L = fmod($L, 360) + ($L - ceil($L) + 1);