Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public static function make(Table $table):bool { |
||
26 | $type = $table->getSource()->write()->getType(); |
||
27 | |||
28 | if (array_key_exists($type, static::$map)) { |
||
29 | $className = static::$map[$type]; |
||
30 | /** @var TableCreator $creator */ |
||
31 | $creator = new $className(); |
||
32 | return $creator->create($table->getSource()->write(), $table->getStruct()); |
||
33 | } |
||
34 | return false; |
||
35 | } |
||
36 | } |