<commit_before><?php

class Location extends Elegant
{
    protected $softDelete = true;
    protected $table = 'locations';
    protected $rules = array(
            'name'  		=> 'required|alpha_space|min:3|max:255|unique:locations,name,{id}',
            'city'   		=> 'required|alpha_space|min:3|max:255',
            'state'   		=> 'required|alpha|min:2|max:32',
            'country'   	=> 'required|alpha|min:2|max:2|max:2',
            'address'		=> 'required|alpha_space|min:5|max:80',
            'address2'		=> 'alpha_space|min:5|max:80',
            'zip'   		=> 'alpha_dash|min:3|max:10',
        );

    public function has_users()
    {
        return $this->hasMany('User', 'location_id')->count();
    }
}<commit_msg>Fixes #451 - allows spaces in state name<commit_after><?php

class Location extends Elegant
{
    protected $softDelete = true;
    protected $table = 'locations';
    protected $rules = array(
            'name'  		=> 'required|alpha_space|min:3|max:255|unique:locations,name,{id}',
            'city'   		=> 'required|alpha_space|min:3|max:255',
            'state'   		=> 'required|alpha_space|min:2|max:32',
            'country'   	=> 'required|alpha_space|min:2|max:2|max:2',
            'address'		=> 'required|alpha_space|min:5|max:80',
            'address2'		=> 'alpha_space|min:5|max:80',
            'zip'   		=> 'alpha_dash|min:3|max:10',
        );

    public function has_users()
    {
        return $this->hasMany('User', 'location_id')->count();
    }
}
{'fraction_non_alphanumeric': 0.17275747508305647, 'fraction_numerical': 0.03388704318936877, 'mean_word_length': 2.7556109725685785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '6164643', 'n_tokens_mistral': 544, 'n_tokens_neox': 522, 'n_words': 74}