public function isValidProfile($profile) { if (!is_string($profile) || empty($profile)) { throw new \InvalidArgumentException('Invalid profile'); } $config = $this->getConfig(); return isset($config[$profile]); }