| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | class ForeignKey |
||
| 23 | { |
||
| 24 | private ReferentialAction $on_delete = ReferentialAction::NO_ACTION; |
||
| 25 | private ReferentialAction $on_update = ReferentialAction::NO_ACTION; |
||
| 26 | |||
| 27 | public function __construct(public readonly array $local_columns, public readonly string $foreign_table, public readonly array $foreign_columns) |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param ReferentialAction $on_delete |
||
| 33 | * |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | public function onDelete(ReferentialAction $on_delete): static |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param ReferentialAction $on_update |
||
| 45 | * |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | public function onUpdate(ReferentialAction $on_update): static |
||
| 55 |