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