<commit_before><?php
/**
 * @link    http://hiqdev.com/hipanel-module-domain
 * @license http://hiqdev.com/hipanel-module-domain/license
 * @copyright Copyright (c) 2015 HiQDev
 */

namespace hipanel\modules\server\widgets;

use hipanel\modules\server\models\Server;

class Expires extends \hipanel\widgets\Label
{
    /**
     * @var Server
     */
    public $model;

    public function run () {
        $expires = $this->model->expires;
        if (strtotime("+30 days", time()) < strtotime($expires)) $class = 'info';
        elseif (strtotime("+0 days", time()) < strtotime($expires)) $class = 'warning';
        else $class = 'danger';

        $this->zclass   = $class;
        $this->label    = \Yii::$app->formatter->asDate($expires);
        parent::run();
    }

}<commit_msg>fixed Label zclass -> color<commit_after><?php
/**
 * @link    http://hiqdev.com/hipanel-module-domain
 * @license http://hiqdev.com/hipanel-module-domain/license
 * @copyright Copyright (c) 2015 HiQDev
 */

namespace hipanel\modules\server\widgets;

use hipanel\modules\server\models\Server;
use Yii;

class Expires extends \hipanel\widgets\Label
{
    /**
     * @var Server
     */
    public $model;

    public function run () {
        $expires = $this->model->expires;
        if (strtotime("+30 days", time()) < strtotime($expires)) $class = 'info';
        elseif (strtotime("+0 days", time()) < strtotime($expires)) $class = 'warning';
        else $class = 'danger';

        $this->color = $class;
        $this->label = Yii::$app->formatter->asDate($expires);
        parent::run();
    }

}
{'fraction_non_alphanumeric': 0.17462311557788945, 'fraction_numerical': 0.008793969849246231, 'mean_word_length': 2.9044117647058822, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 16, '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': '2191830', 'n_tokens_mistral': 539, 'n_tokens_neox': 531, 'n_words': 103}