<commit_before><?php
/**
 * @package    Quafzi_DiscountPreview
 * @copyright  Copyright (c) 2013 <NAME>
 * @author     <NAME> <<EMAIL>>
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

class Quafzi_DiscountPreview_Model_Observer
{
    public function blockCatalogProductGetPriceHtml($observer)
    {
        $block  = $observer->getBlock();
        $helper = Mage::helper('quafzi_discountpreview');
        $helper->setProduct($block->getProduct());

        $block->setTemplate('discountpreview/discount.phtml');
        $block->setDiscountPercent($helper->getDiscountPercent());
        $block->setDiscountAmount($helper->getDiscountAmount());


        $container = $observer->getContainer();
        $html = $container->getHtml() . $block->toHtml();
        $container->setHtml($html);
    }

    protected function _getDiscountInfo($_product)<commit_msg>Add some type hints<commit_after><?php
/**
 * @package    Quafzi_DiscountPreview
 * @copyright  Copyright (c) 2013 <NAME>
 * @author     <NAME> <<EMAIL>>
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

class Quafzi_DiscountPreview_Model_Observer
{
    public function blockCatalogProductGetPriceHtml(Varien_Object $observer)
    {
        $block  = $observer->getBlock();
        $helper = Mage::helper('quafzi_discountpreview');
        $helper->setProduct($block->getProduct());

        $block->setTemplate('discountpreview/discount.phtml');
        $block->setDiscountPercent($helper->getDiscountPercent());
        $block->setDiscountAmount($helper->getDiscountAmount());


        $container = $observer->getContainer();
        $html = $container->getHtml() . $block->toHtml();
        $container->setHtml($html);
    }

    protected function _getDiscountInfo(Mage_Catalog_Model_Product $_product)
{'fraction_non_alphanumeric': 0.14846691769768694, 'fraction_numerical': 0.008606777837547068, 'mean_word_length': 3.8186528497409324, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5561599', 'n_tokens_mistral': 571, 'n_tokens_neox': 547, 'n_words': 84}