| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class MysqlTableSchema extends TableSchema |
||
| 10 | { |
||
| 11 | private array $foreignKeys = []; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @return array foreign keys of this table. Each array element is of the following structure: |
||
| 15 | * |
||
| 16 | * ```php |
||
| 17 | * [ |
||
| 18 | * 'ForeignTableName', |
||
| 19 | * 'fk1' => 'pk1', // pk1 is in foreign table |
||
| 20 | * 'fk2' => 'pk2', // if composite foreign key |
||
| 21 | * ] |
||
| 22 | * ``` |
||
| 23 | */ |
||
| 24 | public function getForeignKeys(): array |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | public function foreignKey(string $id, array $to): void |
||
| 31 | { |
||
| 32 | $this->foreignKeys[$id] = $to; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function foreignKeys(array $value): void |
||
| 38 | } |
||
| 39 | } |
||
| 40 |