| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public static function createInstance(string $table, array $schema, array $columns): self |
||
| 24 | { |
||
| 25 | $index = new self($table, $schema['name']); |
||
| 26 | $index->type = $schema['unique'] ? self::UNIQUE : self::NORMAL; |
||
| 27 | |||
| 28 | foreach ($columns as $column) { |
||
| 29 | $index->columns[] = $column['name']; |
||
| 30 | } |
||
| 31 | |||
| 32 | return $index; |
||
| 33 | } |
||
| 34 | |||
| 64 |