| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 65 | private static function createInstance(string $type, string $baseDir): App |
||
| 66 | { |
||
| 67 | if (!isset(self::ADAPTERS[$type])) { |
||
| 68 | throw AppException::adapterNotSupported($type); |
||
| 69 | } |
||
| 70 | |||
| 71 | $adapterClass = self::ADAPTERS[$type]; |
||
| 72 | |||
| 73 | App::setBaseDir($baseDir); |
||
| 74 | |||
| 75 | return new App(new $adapterClass()); |
||
| 76 | } |
||
| 77 | } |