Cleaned up MainLogger registration and declared a typehint

Remove null hint from MainLogger::getLogger() so static analysis doesn't complain everywhere
just make sure you register the logger before trying to use MainLogger::getLogger() on a different thread!
This commit is contained in:
Dylan K. Taylor
2017-07-14 11:39:04 +01:00
parent 08b8debd78
commit b5790d19bf
3 changed files with 10 additions and 12 deletions

View File

@ -38,9 +38,7 @@ class AsyncWorker extends Worker{
public function run(){
$this->registerClassLoader();
if(MainLogger::getLogger() === null){
$this->logger->registerStatic();
}
$this->logger->registerStatic();
gc_enable();
ini_set("memory_limit", '-1');