<commit_before><?php

require_once 'Swat/SwatCellRenderer.php';

/**
 * A text cell renderer
 *
 * @package   Swat
 * @copyright 2004-2005 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 */
class SwatTextCellRenderer extends SwatCellRenderer
{
	/**
	 * Cell value
	 *
	 * The textual content to place within this cell.
	 *
	 * @var string
	 */
	public $value = '';

	/**
	 * Renders the contents of this cell
	 *
	 * @see swatcellrenderer::render()
	 */
	public function render()
	{
		echo $this->value;
	}
}

?><commit_msg>Make it possible to do text substitution with this renderer.<commit_after><?php

require_once 'Swat/SwatCellRenderer.php';

/**
 * A text cell renderer
 *
 * @package   Swat
 * @copyright 2004-2005 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 */
class SwatTextCellRenderer extends SwatCellRenderer
{
	/**
	 * Cell content
	 *
	 * The textual content to place within this cell.
	 *
	 * @var string
	 */
	public $text = '';

	/**
	 * A value to substitute into the text of this cell
	 *
	 * The value is substituted using a call to printf. For example, if the
	 * {@link SwatCellRendererText::$text} property is set to 'My %s example'
	 * and the value property is set to 'awesome' the cell renderer will render
	 * as 'My aswesome example'.
	 *
	 * @var string
	 */
	public $value = null;

	/**
	 * Renders the contents of this cell
	 *
	 * @see swatcellrenderer::render()
	 */
	public function render()
	{
		if ($this->value === null)
			echo $this->text;
		else
			printf($this->text, $this->value);
	}
}

?>
{'fraction_non_alphanumeric': 0.12546583850931678, 'fraction_numerical': 0.012422360248447204, 'mean_word_length': 3.1627906976744184, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '5190054', 'n_tokens_mistral': 568, 'n_tokens_neox': 509, 'n_words': 165}