| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 44 | public static function make(string $name, array $config) |
|
| 37 | { |
||
| 38 | 44 | $namespace = Str::studly($name); |
|
| 39 | 44 | $application = __NAMESPACE__."\\{$namespace}\\Application"; |
|
| 40 | |||
| 41 | 44 | if (class_exists($application)) { |
|
| 42 | // Instantiation application |
||
| 43 | 42 | return new $application($config); |
|
| 44 | } |
||
| 45 | 2 | throw new ApplicationException("Application [{$name}] does not exist"); |
|
| 46 | } |
||
| 63 |