src/PeekAndPoke/Aviator/ServiceContainer/ServiceContainerCodeGenerator.php
private function generateConfigCreatorMethod(ConfigService $config)
    {
        $configClass = Util::normalizeFqcn($config->getClass());
        $configData  = var_export($config->getData(), true);

        return <<<PHP

    public function getAppConfig() : {$configClass} 
    {
        if (isset(\$this->singletons['{$config->getId()}}'])) {
            return \$this->singletons['{$config->getId()}'];
        }
        
        \$data = {$configData}; 
        
        return \$this->singletons['{$config->getId()}'] = new {$configClass}(\$data);  
    }

PHP;
    }
private function generateConfigCreatorMethod(ConfigService $config)
    {
        $configClass = Util::normalizeFqcn($config->getClass());
        $configData  = var_export($config->getData(), true);

        return <<<PHP

    public function getAppConfig() : {$configClass} 
    {
        if (isset(\$this->singletons['{$config->getId()}}'])) {
            return \$this->singletons['{$config->getId()}'];
        }
        
        \$data = {$configData}; 
        
        return \$this->singletons['{$config->getId()}'] = new {$configClass}(\$data);  
    }

PHP;
    }
Generates the creator method for the config

@param ConfigService $config

@return string