Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
26 | class Factory |
||
27 | { |
||
28 | /** |
||
29 | * @param string $name |
||
30 | * @param array $config |
||
31 | * |
||
32 | * @return \EasyWeChat\Kernel\ServiceContainer |
||
33 | */ |
||
34 | 1 | public static function make($name, array $config) |
|
35 | { |
||
36 | 1 | $namespace = Kernel\Support\Str::studly($name); |
|
37 | 1 | $application = "\\EasyWeChat\\{$namespace}\\Application"; |
|
38 | |||
39 | 1 | return new $application($config); |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * Dynamically pass methods to the application. |
||
44 | * |
||
45 | * @param string $name |
||
46 | * @param array $arguments |
||
47 | * |
||
48 | * @return mixed |
||
49 | */ |
||
50 | 1 | public static function __callStatic($name, $arguments) |
|
53 | } |
||
54 | } |
||
55 |