Server: fixed signatures and type-checks for logger

this might not be a MainLogger instance, but it definitely has to be an \AttachableThreadedLogger instance.
This commit is contained in:
Dylan K. Taylor 2018-05-10 10:49:41 +01:00
parent 5e91c05424
commit 78b5cc993b

View File

@ -574,7 +574,7 @@ class Server{
}
/**
* @return MainLogger
* @return \AttachableThreadedLogger
*/
public function getLogger(){
return $this->logger;
@ -1399,12 +1399,12 @@ class Server{
}
/**
* @param \ClassLoader $autoloader
* @param \ThreadedLogger $logger
* @param string $dataPath
* @param string $pluginPath
* @param \ClassLoader $autoloader
* @param \AttachableThreadedLogger $logger
* @param string $dataPath
* @param string $pluginPath
*/
public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, string $dataPath, string $pluginPath){
public function __construct(\ClassLoader $autoloader, \AttachableThreadedLogger $logger, string $dataPath, string $pluginPath){
if(self::$instance !== null){
throw new \InvalidStateException("Only one server instance can exist at once");
}