InvalidArgumentException
private function ensureNotNegative(int $value, string $type) : void { if ($value < 0) { throw new InvalidArgumentException(sprintf('Value for %s must not be negative.', $type)); } }