mirror of
https://github.com/danog/PrimeModule.git
synced 2024-11-26 20:34:37 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
cfbfe5b988
commit
ef128d37c9
@ -185,13 +185,19 @@ class PrimeModule
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function native_single_cpp($what)
|
||||
{
|
||||
if (!extension_loaded('primemodule')) return false;
|
||||
if (!extension_loaded('primemodule')) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return factorize($what);
|
||||
} catch (\Exception $e) { return false; }
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function native_cpp($what)
|
||||
{
|
||||
$res = [self::native_single_cpp($what)];
|
||||
|
@ -32,7 +32,6 @@ function test($n)
|
||||
$GLOBALS['medium']['python_alt'] += $time;
|
||||
echo '| '.str_pad($result, 6, ' ', STR_PAD_RIGHT).' | python alt | '.str_pad($time, 20, ' ', STR_PAD_RIGHT).' |'.PHP_EOL;
|
||||
|
||||
|
||||
list($time, $result) = get_time(['\danog\PrimeModule', 'python'], $n);
|
||||
$GLOBALS['medium']['python'] += $time;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user