mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Replace InvalidStateException usages with InvalidArgument or LogicException
This commit is contained in:
@ -88,12 +88,9 @@ class TaskScheduler{
|
||||
return $this->tasks->contains($task);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \InvalidStateException
|
||||
*/
|
||||
private function addTask(Task $task, int $delay, int $period) : TaskHandler{
|
||||
if(!$this->enabled){
|
||||
throw new \InvalidStateException("Tried to schedule task to disabled scheduler");
|
||||
throw new \LogicException("Tried to schedule task to disabled scheduler");
|
||||
}
|
||||
|
||||
if($delay <= 0){
|
||||
|
Reference in New Issue
Block a user