original_string: protected function getAttributeCastForColumnType($type, $length = null)
      {
          switch ($type) {
  
              case 'bool':
                  return AttributeCast::BOOLEAN;
  
              case 'tinyint':
                  if ($length === 1) {
                      return AttributeCast::BOOLEAN;
                  }
                  return AttributeCast::INTEGER;
  
              case 'int':
              case 'integer':
              case 'mediumint':
              case 'smallint':
              case 'bigint':
                  return AttributeCast::INTEGER;
  
              case 'dec':
              case 'decimal':
              case 'double':
              case 'float':
              case 'real':
                  return AttributeCast::FLOAT;
  
              case 'varchar':
              case 'char':
              case 'enum':
              case 'text':
              case 'mediumtext':
              case 'longtext':
              case 'tinytext':
              case 'year':
              case 'blob';
              case 'mediumblob';
              case 'longblob';
              case 'binary';
              case 'varbinary';
                  return AttributeCast::STRING;
  
              case 'date':
              case 'datetime':
              case 'time':
              case 'timestamp':
                  return AttributeCast::DATE;
  
              default:
                  return $type;
          }
      }
code: protected function getAttributeCastForColumnType($type, $length = null)
      {
          switch ($type) {
  
              case 'bool':
                  return AttributeCast::BOOLEAN;
  
              case 'tinyint':
                  if ($length === 1) {
                      return AttributeCast::BOOLEAN;
                  }
                  return AttributeCast::INTEGER;
  
              case 'int':
              case 'integer':
              case 'mediumint':
              case 'smallint':
              case 'bigint':
                  return AttributeCast::INTEGER;
  
              case 'dec':
              case 'decimal':
              case 'double':
              case 'float':
              case 'real':
                  return AttributeCast::FLOAT;
  
              case 'varchar':
              case 'char':
              case 'enum':
              case 'text':
              case 'mediumtext':
              case 'longtext':
              case 'tinytext':
              case 'year':
              case 'blob';
              case 'mediumblob';
              case 'longblob';
              case 'binary';
              case 'varbinary';
                  return AttributeCast::STRING;
  
              case 'date':
              case 'datetime':
              case 'time':
              case 'timestamp':
                  return AttributeCast::DATE;
  
              default:
                  return $type;
          }
      }
code_tokens: protected function getAttributeCastForColumnType ( $ type , $ length = null ) { switch ( $ type ) { case 'bool' : return AttributeCast :: BOOLEAN ; case 'tinyint' : if ( $ length === 1 ) { return AttributeCast :: BOOLEAN ; } return AttributeCast :: INTEGER ; case 'int' : case 'integer' : case 'mediumint' : case 'smallint' : case 'bigint' : return AttributeCast :: INTEGER ; case 'dec' : case 'decimal' : case 'double' : case 'float' : case 'real' : return AttributeCast :: FLOAT ; case 'varchar' : case 'char' : case 'enum' : case 'text' : case 'mediumtext' : case 'longtext' : case 'tinytext' : case 'year' : case 'blob' ; case 'mediumblob' ; case 'longblob' ; case 'binary' ; case 'varbinary' ; return AttributeCast :: STRING ; case 'date' : case 'datetime' : case 'time' : case 'timestamp' : return AttributeCast :: DATE ; default : return $ type ; } }
docstring: Returns cast enum value for database column type string and length.
  
  @param string   $type
  @param null|int $length
  @return string
docstring_tokens: Returns cast enum value for database column type string and length .