/** * @param array $inputOption * * @return array|\FM\IoBundle\Export\FeedType\AbstractFeedType[] * * @throws \InvalidArgumentException */ protected function getTypes(array $inputOption) { $types = $inputOption; if ([] === $types) { $types = $this->exporter->getTypes(); } else { foreach ($types as &$type) { if (false === $this->exporter->hasType($type)) { throw new \InvalidArgumentException(sprintf('%s not supported', $type)); } $type = $this->exporter->getType($type); } } return $types; }