/** * @throws ServiceDefinitionNotFound * * @param ServiceId $serviceId * @param DiConfig $diConfig */ private function checkServiceIsDefined(ServiceId $serviceId, DiConfig $diConfig) { if (!$diConfig->serviceIsDefined($serviceId)) { throw ServiceDefinitionNotFound::constructWithServiceId($serviceId); } }
/** * @throws ServiceDefinitionNotFound * * @param ServiceId $serviceId * @return string[] */ public function getArguments(ServiceId $serviceId) { if (!$this->serviceIsDefined($serviceId)) { throw ServiceDefinitionNotFound::constructWithServiceId($serviceId); } return $this->definitions[(string) $serviceId]->getArguments(); }