<commit_before><?php

/*
 * License plugin for HiDev
 *
 * @link      https://github.com/hiqdev/hidev-license
 * @package   hidev-license
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/)
 */

namespace hidev\license\goals;

use hidev\helpers\Helper;

/**
 * Goal for LICENSE generation.
 */
class LicenseGoal extends \hidev\goals\TemplateGoal
{
    /**
     * The license.
     * @var string
     */
    protected $_license;

    /**
     * Set license.
     * @param string $value
     */
    public function setLicense($value)
    {
        $this->_license = $value;
    }

    /**
     * Get license.
     * @return string
     */
    public function getLicense()
    {
        if ($this->_license === null) {
            $this->_license = $this->getPackage()->getLicense();
        }

        return $this->_license;
    }

    /**
     * Get license template.
     * @return string
     */
    public function getTemplate()
    {
        return 'licenses/' . Helper::id2camel($this->getLicense()) . '.twig';
    }

    /**
     * Returns URL to license description.
     * @return string
     */
    public function getUrl()
    {
        return $this->license === 'proprietary'
            ? 'https://en.wikipedia.org/wiki/Proprietary_software'
            : 'http://choosealicense.com/licenses/' . Helper::camel2id($this->getLicense());
    }
}<commit_msg>minor<commit_after><?php

/*
 * License plugin for HiDev
 *
 * @link      https://github.com/hiqdev/hidev-license
 * @package   hidev-license
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/)
 */

namespace hidev\license\goals;

use hidev\helpers\Helper;

/**
 * Goal for LICENSE generation.
 */
class LicenseGoal extends \hidev\goals\TemplateGoal
{
    /**
     * The license.
     * @var string
     */
    protected $_license;

    /**
     * Set license.
     * @param string $value
     */
    public function setLicense($value)
    {
        $this->_license = $value;
    }

    /**
     * Get license.
     * @return string
     */
    public function getLicense()
    {
        if ($this->_license === null) {
            $this->_license = $this->getPackage()->getLicense();
        }

        return $this->_license;
    }

    /**
     * Get license template.
     * @return string
     */
    public function getTemplate()
    {
        return 'licenses/' . Helper::id2camel($this->getLicense()) . '.twig';
    }

    /**
     * Returns URL to license description.
     * @return string
     */
    public function getUrl()
    {
        return $this->getLicense() === 'proprietary'
            ? 'https://en.wikipedia.org/wiki/Proprietary_software'
            : 'http://choosealicense.com/licenses/' . Helper::camel2id($this->getLicense());
    }
}
{'fraction_non_alphanumeric': 0.15198002140563682, 'fraction_numerical': 0.0049946485907955765, 'mean_word_length': 2.037919826652221, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 4, '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': '4089392', 'n_tokens_mistral': 880, 'n_tokens_neox': 861, 'n_words': 174}