Applied fixes from StyleCI
This commit is contained in:
parent
a540b0a4cf
commit
aed44236d1
@ -64,7 +64,7 @@ class Logging
|
||||
if (!is_string($param)) {
|
||||
$param = var_export($param, true);
|
||||
}
|
||||
$param = basename(debug_backtrace()[0]["file"], '.php').': '.$param;
|
||||
$param = basename(debug_backtrace()[0]['file'], '.php').': '.$param;
|
||||
switch ($mode) {
|
||||
case '1':
|
||||
error_log($param);
|
||||
|
@ -63,7 +63,9 @@ class MsgIdHandler extends MessageHandler
|
||||
ksort($this->incoming_messages);
|
||||
}
|
||||
}
|
||||
public function generate_message_id() {
|
||||
|
||||
public function generate_message_id()
|
||||
{
|
||||
$ms_time = (time() + $this->timedelta) * 1000;
|
||||
$int_message_id = (int) (
|
||||
((int) ($ms_time / 1000) << 32) |
|
||||
@ -76,6 +78,7 @@ class MsgIdHandler extends MessageHandler
|
||||
$int_message_id += 4;
|
||||
}
|
||||
$this->check_message_id($int_message_id, true);
|
||||
|
||||
return $int_message_id;
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class PrimeModule extends Tools
|
||||
{
|
||||
$pqstr = (string) $pq;
|
||||
|
||||
$this->log->log("Trying to use the python factorization module");
|
||||
$this->log->log('Trying to use the python factorization module');
|
||||
if (function_exists('shell_exec')) {
|
||||
try {
|
||||
$res = json_decode(shell_exec('python '.__DIR__.'/getpq.py '.$pqstr));
|
||||
@ -91,7 +91,7 @@ class PrimeModule extends Tools
|
||||
}
|
||||
}
|
||||
|
||||
$this->log->log("Trying to use the wolfram alpha factorization module");
|
||||
$this->log->log('Trying to use the wolfram alpha factorization module');
|
||||
$query = 'Do prime factorization of '.$pqstr;
|
||||
$params = [
|
||||
'async' => true,
|
||||
@ -120,7 +120,7 @@ class PrimeModule extends Tools
|
||||
return $res;
|
||||
}
|
||||
|
||||
$this->log->log("Trying to use the native factorization module");
|
||||
$this->log->log('Trying to use the native factorization module');
|
||||
$res = $this->find_small_multiplier_lopatin((int) $pqstr);
|
||||
$res = [$res, $pqstr / $res];
|
||||
if ($res[1] != 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user