<commit_before><?php

namespace Dahl\PhpTerm\Output;

/**
 * Output handler for printing to terminal.
 * 
 * @package 
 * @copyright Copyright (C) 2015 <NAME>
 * @author <NAME> <<EMAIL>> 
 * @license GNU GPL v3.0 <http://www.gnu.org/licenses/gpl-3.0.html>
 */
class Terminal
{
    /**
     * Clears screen
     * 
     * @access public
     * @return Terminal
     */
    public function clear()
    {
        echo "\x1b2J";

        return $this;
    }
}<commit_msg>Added cursor position methods<commit_after><?php

namespace Dahl\PhpTerm\Output;

/**
 * Output handler for printing to terminal.
 * 
 * @package 
 * @copyright Copyright (C) 2015 <NAME>
 * @author <NAME> <<EMAIL>> 
 * @license GNU GPL v3.0 <http://www.gnu.org/licenses/gpl-3.0.html>
 */
class Terminal
{
    /**
     * Clear screen
     * 
     * @access public
     * @return Terminal
     */
    public function cls()
    {
        echo "\x1b[2J";

        return $this;
    }

    /**
     * Sets the cursor position. Defaults to top left corner.
     * 
     * @param int $row
     * @param int $col
     * @access public
     * @return Terminal
     */
    public function pos($row = null, $col = null)
    {
        if (!(int)$row) {
            $row = 1;
        }
        if (!(int)$col) {
            $col = 1;
        }
        echo "\x1b[{$row};{$col}H";

        return $this;
    }

    /**
     * Returns viewport size.
     * 
     * @access public
     * @return array
     */
    public function getSize()
    {
    }

    /**
     * Returns the cursor position.
     * 
     * @access public
     * @return array
     */
    public function getPos()
    {
        echo "\x1b[6n";
    }
}
{'fraction_non_alphanumeric': 0.14465032875074715, 'fraction_numerical': 0.014943215780035863, 'mean_word_length': 1.7087378640776698, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3174447', 'n_tokens_mistral': 578, 'n_tokens_neox': 545, 'n_words': 139}