<commit_before><?php
namespace asinfotrack\yii2\toolbox\gii\model;

class Generator extends \yii\gii\generators\model\Generator
{

	/**
	 * @var string name of the font-awesome icon
	 */
	public $iconName;

	/**
	 * @inheritdoc
	 */
	public function getName()
	{
		return 'ASi Model-Generator';
	}

	/**
	 * @inheritdoc
	 */
	public function rules()
	{
		return array_merge(parent::rules(), [
			[['iconName'], 'match', 'pattern' => '/^[\w-]+$/', 'message' => 'Only word characters and \'-\' are allowed.'],
		]);
	}
<commit_msg>Improve icon name pattern<commit_after><?php
namespace asinfotrack\yii2\toolbox\gii\model;

class Generator extends \yii\gii\generators\model\Generator
{

	/**
	 * @var string name of the font-awesome icon
	 */
	public $iconName;

	/**
	 * @inheritdoc
	 */
	public function getName()
	{
		return 'ASi Model-Generator';
	}

	/**
	 * @inheritdoc
	 */
	public function rules()
	{
		return array_merge(parent::rules(), [
			[['iconName'], 'match', 'pattern' => '/^\w+([\w-]*)\w+$/', 'message' => 'Only word characters and \'-\' are allowed.'],
		]);
	}

{'fraction_non_alphanumeric': 0.19294990723562153, 'fraction_numerical': 0.0018552875695732839, 'mean_word_length': 3.4221311475409837, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2847269', 'n_tokens_mistral': 413, 'n_tokens_neox': 377, 'n_words': 83}