<commit_before><?php
/**
 * WhSparkLines class
 *
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright &copy; 2amigos.us 2013-
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @package YiiWheels.widgets
 * @uses YiiWheels.WhHtml
 */
Yii::import('yiiwheels.helpers.WhHtml');

class WhSparkLines extends CWidget
{
	/**
	 * @var string the tag name to render the sparkline to
	 * NOTE: span type of tag may have issues.
	 */
	public $tagName = 'div';

	/**
	 * @var array the data to show on the chart
	 * @see http://omnipotent.net/jquery.sparkline/#s-about
	 */
	public $data = array();

	/**
	 * @var array additional HTML attributes to the tag
	 */
	public $htmlOptions = array();

	/**
	 * @var array plugin options
	 */
	public $pluginOptions = array();

	/**
	 * Debug mode
	 * Used to publish full js file instead of min version
	 */
	public $debugMode = false;

	/**
	 * Widget's initialization method
	 */
	public function init()
	{
		if (empty($this->data))
			throw new CException(Yii::t('zii', '"data" attribute cannot be blank'));

		$this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));

		$this->htmlOptions['id'] = WhHtml::getOption('id', $this->htmlOptions, $this->getId());
	}

	/**
	 * Widget's run method
	 */
	public function run()
	{
		echo CHtml::tag($this->tagName, $this->htmlOptions);
		$this->registerClientScript();
	}

	/**
	 * Registers required client script for sparklines
	 */<commit_msg>modified sparklines<commit_after><?php
/**
 * WhSparkLines class
 *
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright &copy; 2amigos.us 2013-
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @package YiiWheels.widgets
 * @uses YiiWheels.WhHtml
 */
Yii::import('yiiwheels.helpers.WhHtml');

class WhSparkLines extends CWidget
{
	/**
	 * @var string the tag name to render the sparkline to
	 * NOTE: span type of tag may have issues.
	 */
	public $tagName = 'div';

	/**
	 * @var array the data to show on the chart
	 * @see http://omnipotent.net/jquery.sparkline/#s-about
	 */
	public $data = array();

	/**
	 * @var array additional HTML attributes to the tag
	 */
	public $htmlOptions = array();

	/**
	 * @var array plugin options
	 */
	public $pluginOptions = array();

	/**
	 * Debug mode
	 * Used to publish full js file instead of min version
	 */
	public $debugMode = false;

	/**
	 * Widget's initialization method
	 */
	public function init()
	{
		if (empty($this->data))
			throw new CException(Yii::t('zii', '"data" attribute cannot be blank'));

		$this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));

		$this->htmlOptions['id'] = WhHtml::getOption('id', $this->htmlOptions, $this->getId());
	}

	/**
	 * Widget's run method
	 */
	public function run()
	{
		echo CHtml::openTag($this->tagName, $this->htmlOptions);
		echo '</div>';
		$this->registerClientScript();
	}

	/**
	 * Registers required client script for sparklines
	 */
{'fraction_non_alphanumeric': 0.15981277164827817, 'fraction_numerical': 0.003343363423604146, 'mean_word_length': 3.6677067082683306, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 28, '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': '7469171', 'n_tokens_mistral': 1033, 'n_tokens_neox': 947, 'n_words': 269}