| Total Complexity | 6 | 
| Total Lines | 44 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 8 | class FactoryClass  | 
            ||
| 9 | { | 
            ||
| 10 | /** @var class-string<Factory> */  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 11 | private $factory;  | 
            ||
| 12 | |||
| 13 | /**  | 
            ||
| 14 | * @param string|class-string<Factory> $classNameConfig  | 
            ||
| 15 | * @throws ConfigurationException  | 
            ||
| 16 | */  | 
            ||
| 17 | public function __construct(string $classNameConfig)  | 
            ||
| 20 | }  | 
            ||
| 21 | |||
| 22 | public function getInstance(): Factory  | 
            ||
| 23 |     { | 
            ||
| 24 | /** @var class-string<Factory> $factory */  | 
            ||
| 25 | $factory = $this->factory;  | 
            ||
| 26 | return $factory::createDefault();  | 
            ||
| 27 | }  | 
            ||
| 28 | |||
| 29 | /**  | 
            ||
| 30 | * @return string|class-string<Factory>  | 
            ||
| 31 | */  | 
            ||
| 32 | public function asString(): string  | 
            ||
| 33 |     { | 
            ||
| 34 | return $this->factory;  | 
            ||
| 35 | }  | 
            ||
| 36 | |||
| 37 | /**  | 
            ||
| 38 | * @throws ConfigurationException  | 
            ||
| 39 | * @return string|class-string<Factory>  | 
            ||
| 40 | */  | 
            ||
| 41 | private function getClassNameFromConfig(string $className): string  | 
            ||
| 52 | }  | 
            ||
| 53 | }  | 
            ||
| 54 |