Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Index |
||
9 | { |
||
10 | protected array $fields; |
||
11 | protected ?string $name; |
||
12 | protected bool $unique = false; |
||
13 | |||
14 | public function __construct(array $fields, ?string $name = null) |
||
15 | { |
||
16 | $this->fields = $fields; |
||
17 | $this->name = $name; |
||
18 | } |
||
19 | |||
20 | public function unique(): self |
||
21 | { |
||
22 | $this->unique = true; |
||
23 | |||
24 | return $this; |
||
25 | } |
||
26 | |||
27 | public function notUnique(): self |
||
32 | } |
||
33 | } |
||
34 |