lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
public function getIndexFieldDeclarationListSQL($columnsOrIndex) : string
    {
        if ($columnsOrIndex instanceof Index) {
            return implode(', ', $columnsOrIndex->getQuotedColumns($this));
        }

        if (! is_array($columnsOrIndex)) {
            throw new InvalidArgumentException('Fields argument should be an Index or array.');
        }

        $ret = [];

        foreach ($columnsOrIndex as $column => $definition) {
            if (is_array($definition)) {
                $ret[] = $column;
            } else {
                $ret[] = $definition;
            }
        }

        return implode(', ', $ret);
    }
public function getIndexFieldDeclarationListSQL($columnsOrIndex) : string
    {
        if ($columnsOrIndex instanceof Index) {
            return implode(', ', $columnsOrIndex->getQuotedColumns($this));
        }

        if (! is_array($columnsOrIndex)) {
            throw new InvalidArgumentException('Fields argument should be an Index or array.');
        }

        $ret = [];

        foreach ($columnsOrIndex as $column => $definition) {
            if (is_array($definition)) {
                $ret[] = $column;
            } else {
                $ret[] = $definition;
            }
        }

        return implode(', ', $ret);
    }
public function getIndexFieldDeclarationListSQL ( $ columnsOrIndex ) : string { if ( $ columnsOrIndex instanceof Index ) { return implode ( ', ' , $ columnsOrIndex -> getQuotedColumns ( $ this ) ) ; } if ( ! is_array ( $ columnsOrIndex ) ) { throw new InvalidArgumentException ( 'Fields argument should be an Index or array.' ) ; } $ ret = [ ] ; foreach ( $ columnsOrIndex as $ column => $ definition ) { if ( is_array ( $ definition ) ) { $ ret [ ] = $ column ; } else { $ ret [ ] = $ definition ; } } return implode ( ', ' , $ ret ) ; }
Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

@param mixed[]|Index $columnsOrIndex array declaration is deprecated, prefer passing Index to this method
Obtains DBMS specific SQL code portion needed to set an index declaration to be used in statements like CREATE TABLE .