Apply union types in some places (BC breaks)

This commit is contained in:
Dylan K. Taylor
2022-11-23 14:03:35 +00:00
parent 23ae0c7cac
commit 3b6ff3c42b
13 changed files with 30 additions and 83 deletions

View File

@ -40,22 +40,12 @@ class ThreadManager extends \Volatile{
return self::$instance;
}
/**
* @param Worker|Thread $thread
*/
public function add($thread) : void{
if($thread instanceof Thread || $thread instanceof Worker){
$this[spl_object_id($thread)] = $thread;
}
public function add(Worker|Thread $thread) : void{
$this[spl_object_id($thread)] = $thread;
}
/**
* @param Worker|Thread $thread
*/
public function remove($thread) : void{
if($thread instanceof Thread || $thread instanceof Worker){
unset($this[spl_object_id($thread)]);
}
public function remove(Worker|Thread $thread) : void{
unset($this[spl_object_id($thread)]);
}
/**