original_string: public function mapCol(string $table, string $name, string $type, string $len = null): array
      {
          // Try to find by colsName
          $colsName = $this->getColsNameMapping();
          foreach ($colsName as $colRegex => $params) {
              preg_match("/^$colRegex\$/i", $table. '.' . $name, $matches);
              if (!empty($matches)) {
                  return $params;
              }
          }
  
          // Hardcoded types
          if ($type === 'enum') {
              return [
                  'method' => 'randomElement',
                  'params' => [explode("','", substr($len, 1, -1))]
              ];
          }
  
          // Try to find by fieldType
          $colsType = $this->getColsTypeMapping($len);
          if (!array_key_exists($type, $colsType)) {
              $msg = "Can't guess the type $type ({$table}.{$name})";
              throw new NeuralyzerGuesserException($msg);
          }
  
          return $colsType[$type];
      }
code: public function mapCol(string $table, string $name, string $type, string $len = null): array
      {
          // Try to find by colsName
          $colsName = $this->getColsNameMapping();
          foreach ($colsName as $colRegex => $params) {
              preg_match("/^$colRegex\$/i", $table. '.' . $name, $matches);
              if (!empty($matches)) {
                  return $params;
              }
          }
  
          // Hardcoded types
          if ($type === 'enum') {
              return [
                  'method' => 'randomElement',
                  'params' => [explode("','", substr($len, 1, -1))]
              ];
          }
  
          // Try to find by fieldType
          $colsType = $this->getColsTypeMapping($len);
          if (!array_key_exists($type, $colsType)) {
              $msg = "Can't guess the type $type ({$table}.{$name})";
              throw new NeuralyzerGuesserException($msg);
          }
  
          return $colsType[$type];
      }
code_tokens: public function mapCol ( string $ table , string $ name , string $ type , string $ len = null ) : array { // Try to find by colsName $ colsName = $ this -> getColsNameMapping ( ) ; foreach ( $ colsName as $ colRegex => $ params ) { preg_match ( "/^$colRegex\$/i" , $ table . '.' . $ name , $ matches ) ; if ( ! empty ( $ matches ) ) { return $ params ; } } // Hardcoded types if ( $ type === 'enum' ) { return [ 'method' => 'randomElement' , 'params' => [ explode ( "','" , substr ( $ len , 1 , - 1 ) ) ] ] ; } // Try to find by fieldType $ colsType = $ this -> getColsTypeMapping ( $ len ) ; if ( ! array_key_exists ( $ type , $ colsType ) ) { $ msg = "Can't guess the type $type ({$table}.{$name})" ; throw new NeuralyzerGuesserException ( $ msg ) ; } return $ colsType [ $ type ] ; }
docstring: Will map cols first by looking for field name then by looking for field type
  if the first returned nothing
  
  @param string $table
  @param string $name
  @param string $type
  @param mixed $len Used to get options from enum (stored in length)
  
  @return array
  @throws NeuralyzerGuesserException
docstring_tokens: Will map cols first by looking for field name then by looking for field type if the first returned nothing