<commit_before><?php

namespace eleiva\noty;

use yii\helpers\Json;
use yii\base\Widget;

/**
 * Noty Notification Wrapper @see http://ned.im/
 */
class Noty extends Widget {

    /**
     * Notification message 
     * @var string
     */
    public $text;

    /**
     * Notification type
     * @var string
     */
    public $type = self::ALERT;

    /**
     * Other Noty options.
     * @var array
     */
    public $clientOptions = [
        'timeout' => 1000,
        'layout' => 'topRight',
        'dismissQueue' => true,
        'theme' => 'defaultTheme',
    ];

    /**
     * If to register Animate.css @see https://github.com/daneden/animate.css
     * @var boolean
     */
    public $useAnimateCss = false;

    const ALERT = 'alert';
    const SUCCESS = 'success';
    const ERROR = 'error';
    const WARNING = 'warning';
    const INFORMATION = 'information';

    /**
     * Init widget
     */
    public function init() {
        $view = $this->getView();
        $asset = new NotyAsset();
        $asset->register($view);
        if ($this->useAnimateCss) {
            $cssAsset = new AnimateAsset();
            $cssAsset->register($view);
        }

        $this->clientOptions['text'] = $this->text;
        $this->clientOptions['type'] = $this->type;
        $opts = !empty($this->clientOptions) ? Json::encode($this->clientOptions) : "{}";
        $view->registerJs("noty($opts);");
    }

}
<commit_msg>authority<commit_after><?php

namespace eleiva\noty;

use yii\helpers\Json;
use yii\base\Widget;

/**
 * Noty Notification Wrapper @see http://ned.im/
 * 
 * @author <NAME>
 * @author <NAME> <<EMAIL>>
 */
class Noty extends Widget {

    /**
     * Notification message 
     * @var string
     */
    public $text;

    /**
     * Notification type
     * @var string
     */
    public $type = self::ALERT;

    /**
     * Other Noty options.
     * @var array
     */
    public $clientOptions = [
        'timeout' => 1000,
        'layout' => 'topRight',
        'dismissQueue' => true,
        'theme' => 'defaultTheme',
    ];

    /**
     * If to register Animate.css @see https://github.com/daneden/animate.css
     * @var boolean
     */
    public $useAnimateCss = false;

    const ALERT = 'alert';
    const SUCCESS = 'success';
    const ERROR = 'error';
    const WARNING = 'warning';
    const INFORMATION = 'information';

    /**
     * Init widget
     */
    public function init() {
        $view = $this->getView();
        $asset = new NotyAsset();
        $asset->register($view);
        if ($this->useAnimateCss) {
            $cssAsset = new AnimateAsset();
            $cssAsset->register($view);
        }

        $this->clientOptions['text'] = $this->text;
        $this->clientOptions['type'] = $this->type;
        $opts = !empty($this->clientOptions) ? Json::encode($this->clientOptions) : "{}";
        $view->registerJs("noty($opts);");
    }

}

{'fraction_non_alphanumeric': 0.1654109589041096, 'fraction_numerical': 0.0027397260273972603, 'mean_word_length': 2.091005291005291, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 37, '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': '1098468', 'n_tokens_mistral': 939, 'n_tokens_neox': 913, 'n_words': 195}