protected function translateSignal($signal)
    {
        if (isset($this->signals[$signal])) {
            $signal = $this->signals[$signal];
        } elseif (defined($signal)) {
            $signal = constant($signal);
        }

        if (! is_int($signal)) {
            throw new InvalidArgumentException('The given value is not a valid signal');
        }

        return $signal;
    }