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,10 +40,8 @@ class HandlerListManager{
/**
* Unregisters all the listeners
* If a Plugin or Listener is passed, all the listeners with that object will be removed
*
* @param Plugin|Listener|RegisteredListener|null $object
*/
public function unregisterAll($object = null) : void{
public function unregisterAll(RegisteredListener|Plugin|Listener|null $object = null) : void{
if($object instanceof Listener || $object instanceof Plugin || $object instanceof RegisteredListener){
foreach($this->allLists as $h){
$h->unregister($object);