src/Samurai/Component/Migration/Phinx/CodeGenerator.php
public function generateColumnOptions(Column $column)
    {
        $options = [];

        $keys = ['length', 'default', 'collation', 'null', 'precision', 'scale', 'after', 'update', 'comment'];
        foreach ($keys as $key) {
            $method = "get{$key}";
            if ($key === 'length') $method = 'getLimit';

            $value = $column->$method();

            if ($key === 'collation') {
                if ($value === null) {
                    $key = 'charset';
                    $value = $column->getCharset();
                }
            }
            if ($value === null) continue;
            if ($key === 'null' && $value === false) continue;

            $options[$key] = $value;
        }
        
        $code = $this->valuetize($options);
        return $code === '[]' ? '' : ', ' . $code;
    }
public function generateColumnOptions(Column $column)
    {
        $options = [];

        $keys = ['length', 'default', 'collation', 'null', 'precision', 'scale', 'after', 'update', 'comment'];
        foreach ($keys as $key) {
            $method = "get{$key}";
            if ($key === 'length') $method = 'getLimit';

            $value = $column->$method();

            if ($key === 'collation') {
                if ($value === null) {
                    $key = 'charset';
                    $value = $column->getCharset();
                }
            }
            if ($value === null) continue;
            if ($key === 'null' && $value === false) continue;

            $options[$key] = $value;
        }
        
        $code = $this->valuetize($options);
        return $code === '[]' ? '' : ', ' . $code;
    }
public function generateColumnOptions ( Column $ column ) { $ options = [ ] ; $ keys = [ 'length' , 'default' , 'collation' , 'null' , 'precision' , 'scale' , 'after' , 'update' , 'comment' ] ; foreach ( $ keys as $ key ) { $ method = "get{$key}" ; if ( $ key === 'length' ) $ method = 'getLimit' ; $ value = $ column -> $ method ( ) ; if ( $ key === 'collation' ) { if ( $ value === null ) { $ key = 'charset' ; $ value = $ column -> getCharset ( ) ; } } if ( $ value === null ) continue ; if ( $ key === 'null' && $ value === false ) continue ; $ options [ $ key ] = $ value ; } $ code = $ this -> valuetize ( $ options ) ; return $ code === '[]' ? '' : ', ' . $ code ; }
generate column options

@param   Column  $column
@return  string
generate column options