<commit_before><?php

class Accessory extends Elegant
{
    use SoftDeletingTrait;
    protected $dates = ['deleted_at'];
    protected $table = 'accessories';

    /**
    * Category validation rules
    */
    public $rules = array(
        'name'   => 'required|alpha_space|min:3|max:255|unique:accessories,name,{id}',
        'category_id'   	=> 'required|integer',
        'qty'   	=> 'required|integer|min:1',
    );

    public function category()
    {
        return $this->has('Category', 'category_id');
    }

    /**<commit_msg>Fixed relation between accessory and category<commit_after><?php

class Accessory extends Elegant
{
    use SoftDeletingTrait;
    protected $dates = ['deleted_at'];
    protected $table = 'accessories';

    /**
    * Category validation rules
    */
    public $rules = array(
        'name'   => 'required|alpha_space|min:3|max:255|unique:accessories,name,{id}',
        'category_id'   	=> 'required|integer',
        'qty'   	=> 'required|integer|min:1',
    );

    public function category()
    {
        return $this->belongsTo('Category', 'category_id');
    }

    /**
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.008928571428571428, 'mean_word_length': 2.9195804195804196, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '7115252', 'n_tokens_mistral': 357, 'n_tokens_neox': 349, 'n_words': 67}