public static function getTerminateReason($reasonId)
{
$reasons = [1 => 'Shutting-down %s cluster.', 2 => 'Removing replica set from %s cluster.', 3 => 'Farm role does not exist.', 4 => 'Role removed from farm.', 5 => 'Server did not send %s event in %s seconds after launch.', 6 => 'Terminating temporary server.', 7 => 'Terminating role builder temporary server.', 8 => 'Scaling down.', 9 => 'Snapshot cancellation.', 10 => 'Manually terminated by %s.', 11 => 'Terminated through the Scalr API by %s.', 12 => 'Farm was in "%s" state. Server terminated when bundle task has been finished. Bundle task #%s.', 13 => 'Terminating server because the farm has been terminated.', 14 => 'Server replaced with new one after snapshotting.', 15 => 'Server launch was canceled', 16 => 'Server was terminated in cloud or from within an OS'];
if ($reasonId && !isset($reasons[$reasonId])) {
throw new InvalidArgumentException(sprintf('Terminate reason %d doesn\'t have message', $reasonId));
}
return $reasonId ? $reasons[$reasonId] : '';
}