| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Constraint |
||
| 17 | 109 | { |
|
| 18 | private string|array|null $columnNames = null; |
||
| 19 | 109 | private string|null|object $name = null; |
|
| 20 | |||
| 21 | /** |
||
| 22 | 162 | * @return array|string|null The list of column names the constraint belongs to. |
|
| 23 | */ |
||
| 24 | 162 | public function getColumnNames(): array|string|null |
|
| 25 | { |
||
| 26 | return $this->columnNames; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return object|string|null The constraint name. |
||
| 31 | */ |
||
| 32 | 323 | public function getName(): object|string|null |
|
| 33 | { |
||
| 34 | 323 | return $this->name; |
|
| 35 | } |
||
| 36 | 323 | ||
| 37 | /** |
||
| 38 | * Set the list of column names the constraint belongs to. |
||
| 39 | * |
||
| 40 | * @param array|string|null $value The list of column names the constraint belongs to. |
||
| 41 | */ |
||
| 42 | public function columnNames(array|string|null $value): static |
||
| 43 | { |
||
| 44 | 320 | $this->columnNames = $value; |
|
| 45 | return $this; |
||
| 46 | 320 | } |
|
| 47 | |||
| 48 | 320 | /** |
|
| 49 | * Set the constraint name. |
||
| 50 | * |
||
| 51 | * @param object|string|null $value The constraint name. |
||
| 52 | */ |
||
| 53 | public function name(object|string|null $value): static |
||
| 57 | } |
||
| 58 | } |
||
| 59 |