| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 74 | private static function createInstance(string $type, string $baseDir): App |
||
| 75 | { |
||
| 76 | if (!isset(self::ADAPTERS[$type])) { |
||
| 77 | throw AppException::adapterNotSupported($type); |
||
| 78 | } |
||
| 79 | |||
| 80 | $adapterClass = self::ADAPTERS[$type]; |
||
| 81 | |||
| 82 | App::setBaseDir($baseDir); |
||
| 83 | |||
| 84 | return new App(new $adapterClass()); |
||
| 85 | } |
||
| 86 | } |