Apply typehints to all AsyncTask methods

Since we're breaking API here anyway, no point in holding back on this.
This commit is contained in:
Dylan K. Taylor
2018-09-10 15:54:01 +01:00
parent d62e00cc74
commit 37190c9a65
11 changed files with 23 additions and 28 deletions

View File

@ -39,7 +39,7 @@ class AsyncTaskMainLoggerTest extends Test{
$this->storeLocal($testObject);
}
public function onRun(){
public function onRun() : void{
ob_start();
MainLogger::getLogger()->info("Testing");
if(strpos(ob_get_contents(), "Testing") !== false){
@ -48,7 +48,7 @@ class AsyncTaskMainLoggerTest extends Test{
ob_end_flush();
}
public function onCompletion(){
public function onCompletion() : void{
/** @var AsyncTaskMainLoggerTest $test */
$test = $this->fetchLocal();
$test->setResult($this->success ? Test::RESULT_OK : Test::RESULT_FAILED);

View File

@ -50,7 +50,7 @@ class AsyncTaskMemoryLeakTest extends Test{
class TestAsyncTask extends AsyncTask{
public static $destroyed = false;
public function onRun(){
public function onRun() : void{
usleep(50 * 1000); //1 server tick
}