public function render(TableStructure $table, int $indent = 8)
    {
        return str_repeat(' ', $indent)
            . "\$this->createIndex('{$this->name}', '"
            . $table->renderName()
            . "', "
            . (count($this->columns) === 1 ? "'{$this->columns[0]}'" : "['" . implode("', '", $this->columns) . "']")
            . ($this->unique ? ', true' : '')
            . ');';
    }
public function render(TableStructure $table, int $indent = 8)
    {
        return str_repeat(' ', $indent)
            . "\$this->createIndex('{$this->name}', '"
            . $table->renderName()
            . "', "
            . (count($this->columns) === 1 ? "'{$this->columns[0]}'" : "['" . implode("', '", $this->columns) . "']")
            . ($this->unique ? ', true' : '')
            . ');';
    }
public function render ( TableStructure $ table , int $ indent = 8 ) { return str_repeat ( ' ' , $ indent ) . "\$this->createIndex('{$this->name}', '" . $ table -> renderName ( ) . "', " . ( count ( $ this -> columns ) === 1 ? "'{$this->columns[0]}'" : "['" . implode ( "', '" , $ this -> columns ) . "']" ) . ( $ this -> unique ? ', true' : '' ) . ');' ; }
Renders the index.
@param TableStructure $table
@param int $indent
@return string
Renders the index .