protected function setDataType(Field & $field, $type)
    {
        $map = $this->dataTypeMap();

        if (array_key_exists($type, $map)) {
            $field->dataType = $map[$type];
        }

        return $this;
    }
protected function setDataType(Field & $field, $type)
    {
        $map = $this->dataTypeMap();

        if (array_key_exists($type, $map)) {
            $field->dataType = $map[$type];
        }

        return $this;
    }
protected function setDataType ( Field & $ field , $ type ) { $ map = $ this -> dataTypeMap ( ) ; if ( array_key_exists ( $ type , $ map ) ) { $ field -> dataType = $ map [ $ type ] ; } return $ this ; }
Set the data type for a given field.

@param CrestApps\CodeGenerator\Models\Field $field
@param string $type

@return $this
Set the data type for a given field .