src/Valkyrja/Container/Annotations/NativeContainerAnnotations.php
protected function getServiceFromAnnotation(Service $service): ContainerService
    {
        $containerService = new ContainerService();

        $containerService
            ->setDefaults($service->getDefaults())
            ->setSingleton($service->isSingleton())
            ->setId($service->getId())
            ->setName($service->getName())
            ->setClass($service->getClass())
            ->setProperty($service->getProperty())
            ->setMethod($service->getMethod())
            ->setStatic($service->isStatic())
            ->setFunction($service->getFunction())
            ->setMatches($service->getMatches())
            ->setDependencies($service->getDependencies())
            ->setArguments($service->getArguments());

        return $containerService;
    }
protected function getServiceFromAnnotation(Service $service): ContainerService
    {
        $containerService = new ContainerService();

        $containerService
            ->setDefaults($service->getDefaults())
            ->setSingleton($service->isSingleton())
            ->setId($service->getId())
            ->setName($service->getName())
            ->setClass($service->getClass())
            ->setProperty($service->getProperty())
            ->setMethod($service->getMethod())
            ->setStatic($service->isStatic())
            ->setFunction($service->getFunction())
            ->setMatches($service->getMatches())
            ->setDependencies($service->getDependencies())
            ->setArguments($service->getArguments());

        return $containerService;
    }
Get a service from a service annotation.

@param Service $service The service annotation

@return \Valkyrja\Container\Service