protected function validateText($text) { if (!is_string($text)) { $message = 'Invalid Argument. You must supply a string to be translated.'; throw new InvalidArgumentException($message); } return true; }