protected function isTypeAllowed() { $type = $this->input->getOption('type'); $type = strtoupper($type); if ($type && !in_array($type, $this->allowedTypes)) { throw new InvalidArgumentException('Invalid type was given'); } }