| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | final readonly class PrimaryKey implements ComponentInterface |
||
|
|
|||
| 30 | { |
||
| 31 | /** |
||
| 32 | * @param array<array-key,string> $columns |
||
| 33 | */ |
||
| 34 | public function __construct(private readonly array $columns) |
||
| 35 | { |
||
| 36 | } |
||
| 37 | |||
| 38 | public function toDBAL(): DBALIndex |
||
| 39 | { |
||
| 40 | return new DBALIndex( |
||
| 41 | name: 'primary', |
||
| 42 | columns: $this->columns, |
||
| 43 | isUnique: true, |
||
| 44 | isPrimary: true, |
||
| 45 | ); |
||
| 48 |