original_string: private function getTagIdByName( $tag )
      {
          $tagSql = $this->sql( $this->getTableInSchema( static::$tagTableName ) );
  
          $select = $tagSql->select()
                           ->columns( array( 'id' ) )
                           ->where( array(
                               new TypedParameters(
                                   'LOWER(?) = ?',
                                   array(
                                       'name',
                                       mb_strtolower( $tag, 'UTF-8' ),
                                   ),
                                   array(
                                       TypedParameters::TYPE_IDENTIFIER,
                                       TypedParameters::TYPE_VALUE,
                                   )
                               ),
                           ) );
  
          $result = $tagSql->prepareStatementForSqlObject( $select )
                           ->execute();
  
          foreach ( $result as $row )
          {
             return $row['id'];
          }
  
          return null;
      }
code: private function getTagIdByName( $tag )
      {
          $tagSql = $this->sql( $this->getTableInSchema( static::$tagTableName ) );
  
          $select = $tagSql->select()
                           ->columns( array( 'id' ) )
                           ->where( array(
                               new TypedParameters(
                                   'LOWER(?) = ?',
                                   array(
                                       'name',
                                       mb_strtolower( $tag, 'UTF-8' ),
                                   ),
                                   array(
                                       TypedParameters::TYPE_IDENTIFIER,
                                       TypedParameters::TYPE_VALUE,
                                   )
                               ),
                           ) );
  
          $result = $tagSql->prepareStatementForSqlObject( $select )
                           ->execute();
  
          foreach ( $result as $row )
          {
             return $row['id'];
          }
  
          return null;
      }
code_tokens: private function getTagIdByName ( $ tag ) { $ tagSql = $ this -> sql ( $ this -> getTableInSchema ( static :: $ tagTableName ) ) ; $ select = $ tagSql -> select ( ) -> columns ( array ( 'id' ) ) -> where ( array ( new TypedParameters ( 'LOWER(?) = ?' , array ( 'name' , mb_strtolower ( $ tag , 'UTF-8' ) , ) , array ( TypedParameters :: TYPE_IDENTIFIER , TypedParameters :: TYPE_VALUE , ) ) , ) ) ; $ result = $ tagSql -> prepareStatementForSqlObject ( $ select ) -> execute ( ) ; foreach ( $ result as $ row ) { return $ row [ 'id' ] ; } return null ; }
docstring: Get tag id by its name
  
  @param   string  $tag
  @return  int|null
docstring_tokens: Get tag id by its name