Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
31 | 3 | public function getUniqueKeys(string $table): array |
|
32 | { |
||
33 | 3 | if (!isset($this->keys[$table])) { |
|
34 | 3 | $allKeys = $this->connection->getSchemaManager()->listTableIndexes($table); |
|
35 | 3 | $this->keys[$table] = array_filter($allKeys, function (Index $index) { |
|
36 | 3 | return $index->isUnique() || $index->isPrimary(); |
|
37 | 3 | }); |
|
38 | } |
||
39 | 3 | return $this->keys[$table]; |
|
40 | } |
||
41 | } |
||
42 |