1
0
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:
Daniil Gentili 2017-05-06 19:27:51 +00:00 committed by StyleCI Bot
parent cfbfe5b988
commit ef128d37c9
2 changed files with 8 additions and 3 deletions

View File

@ -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)];

View File

@ -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;
/*