Minor refactoring

This commit is contained in:
Meritoo
2019-09-09 16:06:20 +02:00
parent 9903c82496
commit b0e404aeb9

View File

@@ -1322,6 +1322,10 @@ class Miscellaneous
public static function calculateGreatestCommonDivisor(int $first, int $second): int
{
return (0 === $second) ? $first : static::calculateGreatestCommonDivisor($second, $first % $second);
if (0 === $second) {
return $first;
}
return static::calculateGreatestCommonDivisor($second, $first % $second);
}
}