<commit_before><?php
namespace App\Model\Table;

use Cake\Validation\Validator;

class CharactersConditionsTable
	extends AppTable
{

	protected $_contain = [ 'Characters', 'Conditions' ];

	public function initialize(array $config)
	{
		$this->table('characters_conditions');
		$this->displayField('character_id');
		$this->primaryKey(['character_id', 'condition_id']);
		$this->belongsTo('Characters');
		$this->belongsTo('Conditions');
	}

	public function validationDefault(Validator $validator)
	{
		$validator->notEmpty('character_id');
		$validator->notEmpty('condition_id');
		$validaor->allowEmpty('expiry');

		$validaor->add('character_id', 'valid', ['rule' => 'numeric']);
		$validaor->add('condition_id', 'valid', ['rule' => 'numeric']);
		$validaor->add('expiry', 'valid', ['rule' => 'date']);

		$validator->requirePresence('character_id', 'create');
		$validator->requirePresence('condition_id', 'create');

		return $validator;
	}<commit_msg>fix validator typo<commit_after><?php
namespace App\Model\Table;

use Cake\Validation\Validator;

class CharactersConditionsTable
	extends AppTable
{

	protected $_contain = [ 'Characters', 'Conditions' ];

	public function initialize(array $config)
	{
		$this->table('characters_conditions');
		$this->displayField('character_id');
		$this->primaryKey(['character_id', 'condition_id']);
		$this->belongsTo('Characters');
		$this->belongsTo('Conditions');
	}

	public function validationDefault(Validator $validator)
	{
		$validator->notEmpty('character_id');
		$validator->notEmpty('condition_id');
		$validator->allowEmpty('expiry');

		$validator->add('character_id', 'valid', ['rule' => 'numeric']);
		$validator->add('condition_id', 'valid', ['rule' => 'numeric']);
		$validator->add('expiry', 'valid', ['rule' => 'date']);

		$validator->requirePresence('character_id', 'create');
		$validator->requirePresence('condition_id', 'create');

		return $validator;
	}
{'fraction_non_alphanumeric': 0.192008303061754, 'fraction_numerical': 0.0, 'mean_word_length': 7.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, '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': '4255085', 'n_tokens_mistral': 643, 'n_tokens_neox': 613, 'n_words': 98}