Skip to content

Commit 9af76d0

Browse files
committed
Update documentation for index types
1 parent 778b646 commit 9af76d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/en/reference/schema-manager.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,12 @@ Now you can loop over the array inspecting each index object:
139139
140140
<?php
141141
foreach ($indexes as $index) {
142-
echo $index->getObjectName()->toString() . ': ' . ($index->isUnique() ? 'unique' : 'not unique') . PHP_EOL;
142+
echo $index->getObjectName()->toString() . ': ' . match($index->getType()) {
143+
IndexType::REGULAR => 'regular',
144+
IndexType::UNIQUE => 'unique',
145+
IndexType::FULLTEXT => 'fulltext',
146+
IndexType::SPATIAL => 'spatial',
147+
} . PHP_EOL;
143148
}
144149
145150
listTables()

0 commit comments

Comments
 (0)