container = $container; } protected function getService(string $class): object { if (strpos($class, '\\')) { /** @phpstan-var class-string $class */ return $this->container->getByType($class); } else { return $this->container->getService($class); } } }