| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public static function createInstance(string $table, string $tablePrefix, array $schema): self |
||
| 43 | { |
||
| 44 | $reference = new self($table, $tablePrefix, $schema['id']); |
||
| 45 | |||
| 46 | $reference->column = $schema['from']; |
||
| 47 | |||
| 48 | $reference->foreignTable = $schema['table']; |
||
| 49 | $reference->foreignKey = $schema['to']; |
||
| 50 | |||
| 51 | $reference->deleteRule = $schema['on_delete']; |
||
| 52 | $reference->updateRule = $schema['on_update']; |
||
| 53 | |||
| 54 | return $reference; |
||
| 55 | } |
||
| 56 | } |
||
| 57 |