Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | private function getTableIndexType(array $row): string |
||
16 | { |
||
17 | $name = $row['Key_name']; |
||
18 | if ($name === 'PRIMARY') { |
||
19 | return 'PRIMARY'; |
||
20 | } |
||
21 | if ($row['Index_type'] === 'FULLTEXT') { |
||
22 | return 'FULLTEXT'; |
||
23 | } |
||
24 | if (!$row['Non_unique']) { |
||
25 | return 'UNIQUE'; |
||
26 | } |
||
27 | if ($row['Index_type'] === 'SPATIAL') { |
||
28 | return 'SPATIAL'; |
||
29 | } |
||
30 | return 'INDEX'; |
||
31 | } |
||
62 |