<commit_before><?php
/**
 * 
 * This file is part of Aura for PHP.
 * 
 * @package Aura.Html
 * 
 * @license http://opensource.org/licenses/bsd-license.php BSD
 * 
 */
namespace Aura\Html\Helper;

use Aura\Html\HelperLocator;

/**
 * 
 * A helper to generate form input elements.
 * 
 * @package Aura.Html
 * 
 */
class Input extends AbstractHelper
{
    /**
     * 
     * A locator for input elements.
     * 
     * @var HelperLocator
     * 
     */
    protected $helper_locator;
    
    /**
     * 
     * Sets the locator object.
     * 
     * @param HelperLocator $helper_locator
     * 
     * @return null
     * 
     */
    public function setHelperLocator(HelperLocator $helper_locator)
    {
        $this->helper_locator = $helper_locator;
    }
    
    /**
     * 
     * Given an input specification, returns the HTML for the input.
     * 
     * @param array $spec The element specification.
     * 
     * @return object
     * 
     */
    public function __invoke(array $spec = array())
    {
        if (empty($spec['type'])) {
            $spec['type'] = 'text';
        }
        <commit_msg>Input helper does not need to extend AbstractHelper; pass HelperLocator in constructor<commit_after><?php
/**
 * 
 * This file is part of Aura for PHP.
 * 
 * @package Aura.Html
 * 
 * @license http://opensource.org/licenses/bsd-license.php BSD
 * 
 */
namespace Aura\Html\Helper;

use Aura\Html\HelperLocator;

/**
 * 
 * A helper to generate form input elements.
 * 
 * @package Aura.Html
 * 
 */
class Input
{
    /**
     * 
     * A locator for input elements.
     * 
     * @var HelperLocator
     * 
     */
    protected $helper_locator;
    
    /**
     * 
     * Constructor.
     * 
     * @param HelperLocator $helper_locator A locator for input helpers.
     * 
     */
    public function __construct(HelperLocator $helper_locator)
    {
        $this->helper_locator = $helper_locator;
    }
    
    /**
     * 
     * Given an input specification, returns the HTML for the input.
     * 
     * @param array $spec The element specification.
     * 
     * @return object
     * 
     */
    public function __invoke(array $spec = array())
    {
        if (empty($spec['type'])) {
            $spec['type'] = 'text';
        }
        
{'fraction_non_alphanumeric': 0.11829375549692173, 'fraction_numerical': 0.0, 'mean_word_length': 1.879746835443038, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7109459', 'n_tokens_mistral': 741, 'n_tokens_neox': 701, 'n_words': 173}