private function deserializeStatus(FeatureInterface $feature, $status) { switch ($feature) { case 'always-active': $feature->activate(ToggleStatus::ALWAYS_ACTIVE); return; case 'inactive': $feature->deactivate(); return; case 'conditionally-active': $feature->activate(ToggleStatus::CONDITIONALLY_ACTIVE); return; } throw new \RuntimeException(sprintf('Unknown toggle status "%s".', $status)); }