src/Phinx/Db/Table/Column.php
public function setCollation($collation)
    {
        $allowedTypes = [
            AdapterInterface::PHINX_TYPE_CHAR,
            AdapterInterface::PHINX_TYPE_STRING,
            AdapterInterface::PHINX_TYPE_TEXT,
        ];
        if (!in_array($this->getType(), $allowedTypes)) {
            throw new \UnexpectedValueException('Collation may be set only for types: ' . implode(', ', $allowedTypes));
        }

        $this->collation = $collation;

        return $this;
    }
public function setCollation($collation)
    {
        $allowedTypes = [
            AdapterInterface::PHINX_TYPE_CHAR,
            AdapterInterface::PHINX_TYPE_STRING,
            AdapterInterface::PHINX_TYPE_TEXT,
        ];
        if (!in_array($this->getType(), $allowedTypes)) {
            throw new \UnexpectedValueException('Collation may be set only for types: ' . implode(', ', $allowedTypes));
        }

        $this->collation = $collation;

        return $this;
    }
public function setCollation ( $ collation ) { $ allowedTypes = [ AdapterInterface :: PHINX_TYPE_CHAR , AdapterInterface :: PHINX_TYPE_STRING , AdapterInterface :: PHINX_TYPE_TEXT , ] ; if ( ! in_array ( $ this -> getType ( ) , $ allowedTypes ) ) { throw new \ UnexpectedValueException ( 'Collation may be set only for types: ' . implode ( ', ' , $ allowedTypes ) ) ; } $ this -> collation = $ collation ; return $ this ; }
Sets the column collation.

@param string $collation

@throws \UnexpectedValueException If collation not allowed for type
@return $this
Sets the column collation .