package and depencies
This commit is contained in:
@@ -55,15 +55,10 @@ class ProcessTimedOutException extends RuntimeException
|
||||
|
||||
public function getExceededTimeout()
|
||||
{
|
||||
switch ($this->timeoutType) {
|
||||
case self::TYPE_GENERAL:
|
||||
return $this->process->getTimeout();
|
||||
|
||||
case self::TYPE_IDLE:
|
||||
return $this->process->getIdleTimeout();
|
||||
|
||||
default:
|
||||
throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType));
|
||||
}
|
||||
return match ($this->timeoutType) {
|
||||
self::TYPE_GENERAL => $this->process->getTimeout(),
|
||||
self::TYPE_IDLE => $this->process->getIdleTimeout(),
|
||||
default => throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user