Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class ObjectFactory { |
||
14 | |||
15 | const CLASS_MAP = [ |
||
16 | 'address' => Address::class |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * @param Connector $connector |
||
21 | * @param string $model |
||
22 | * @param array $data |
||
23 | * @return Model|null |
||
24 | */ |
||
25 | public static function create(Connector $connector, string $model, array $data = []): ?Model |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @param Connector $connector |
||
36 | * @param array $data |
||
37 | * @return Model|null |
||
38 | */ |
||
39 | public static function make(Connector $connector, array $data): ?Model |
||
47 |