Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 2 | public function hasIndex($table, $index, $type = null, array $options = []) |
|
20 | { |
||
21 | 2 | $name = $index; |
|
22 | |||
23 | 2 | if ($type === null) { |
|
24 | 2 | $type = 'persistent'; |
|
25 | } |
||
26 | |||
27 | 2 | if (is_array($index)) { |
|
28 | 1 | $name = $this->createIndexName($type, $index, $options, $table); |
|
|
|||
29 | } |
||
30 | |||
31 | 2 | return !!$this->schemaManager->getIndexByName($table, $name); |
|
32 | } |
||
55 |