mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Minor refactoring
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user