protected function columnDef($type, $nullDefault = false) {
        $column = ['type' => $type];

        if ($nullDefault === null || $nullDefault == true) {
            $column['required'] = false;
        }
        if ($nullDefault === false) {
            $column['required'] = true;
        } else {
            $column['required'] = true;
            $column['default'] = $nullDefault;
        }

        return $column;
    }
protected function columnDef($type, $nullDefault = false) {
        $column = ['type' => $type];

        if ($nullDefault === null || $nullDefault == true) {
            $column['required'] = false;
        }
        if ($nullDefault === false) {
            $column['required'] = true;
        } else {
            $column['required'] = true;
            $column['default'] = $nullDefault;
        }

        return $column;
    }
protected function columnDef ( $ type , $ nullDefault = false ) { $ column = [ 'type' => $ type ] ; if ( $ nullDefault === null || $ nullDefault == true ) { $ column [ 'required' ] = false ; } if ( $ nullDefault === false ) { $ column [ 'required' ] = true ; } else { $ column [ 'required' ] = true ; $ column [ 'default' ] = $ nullDefault ; } return $ column ; }
Get an array column def from a structured function call.

@param string $type The database type of the column.
@param mixed $nullDefault Whether or not to allow null or the default value.

null|true
: The column is not required.
false
: The column is required.
Anything else
: The column is required and this is its default.

@return array Returns the column def as an array.
Get an array column def from a structured function call .