<commit_before><?php

/*
 * Yii2 asset for bower autosize
 *
 * @link      https://github.com/hiqdev/yii2-asset-autosize
 * @package   yii2-asset-autosize
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
 */

namespace hiqdev\assets\autosize;

class AutosizeAsset extends \yii\web\AssetBundle
{
    public $sourcePath = '@bower/autosize';

    public $js = [
        'dist/autosize.min.js',
    ];
}<commit_msg>Added AutosizeAsset::activate() named constructor<commit_after><?php

/*
 * Yii2 asset for bower autosize
 *
 * @link      https://github.com/hiqdev/yii2-asset-autosize
 * @package   yii2-asset-autosize
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
 */

namespace hiqdev\assets\autosize;

class AutosizeAsset extends \yii\web\AssetBundle
{
    public $sourcePath = '@bower/autosize';

    public $js = [
        'dist/autosize.min.js',
    ];

    /**
     * @param View $view
     * @param string $inputSelector
     * @return static
     */
    public static function activate($view, string $inputSelector = '.autosize'): AutosizeAsset
    {
        $bundle = self::register($view);
        $view->registerJs("(function() { setTimeout(function() { autosize($('{$inputSelector}')) }, 200); })();");

        return $bundle;
    }
}
{'fraction_non_alphanumeric': 0.15718562874251496, 'fraction_numerical': 0.020209580838323353, 'mean_word_length': 3.08868501529052, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '6921169', 'n_tokens_mistral': 481, 'n_tokens_neox': 463, 'n_words': 87}