<commit_before><?php namespace Modules\Page\Http\Requests;

use Modules\Core\Internationalisation\BaseFormRequest;

class UpdatePageRequest extends BaseFormRequest
{
    protected $translationsAttributesKey = 'page::pages.validation.attributes';

    public function rules()
    {
        $page = $this->route()->getParameter('pages');

        return [
            'template' => 'required',
            'is_home' => "unique:page__pages,is_home,{$page->id}",
        ];
    }

    public function translationRules()
    {
        return [
            'title' => 'required',
            'body' => 'required',
        ];
    }

    public function authorize()
    {
        return true;
    }

    public function messages()
    {
        return [
            'template.required' => trans('page::messages.template is required'),
            'is_home.unique' => trans('page::messages.only one homepage allowed'),
        ];
    }

    public function translationMessages()
    {
        return [
            'title.required' => trans('page::messages.title is required'),
            'body.required' => trans('page::messages.body is required'),
        ];
    }
}
<commit_msg>Rename route parameter<commit_after><?php namespace Modules\Page\Http\Requests;

use Modules\Core\Internationalisation\BaseFormRequest;

class UpdatePageRequest extends BaseFormRequest
{
    protected $translationsAttributesKey = 'page::pages.validation.attributes';

    public function rules()
    {
        $page = $this->route()->getParameter('page');

        return [
            'template' => 'required',
            'is_home' => "unique:page__pages,is_home,{$page->id}",
        ];
    }

    public function translationRules()
    {
        return [
            'title' => 'required',
            'body' => 'required',
        ];
    }

    public function authorize()
    {
        return true;
    }

    public function messages()
    {
        return [
            'template.required' => trans('page::messages.template is required'),
            'is_home.unique' => trans('page::messages.only one homepage allowed'),
        ];
    }

    public function translationMessages()
    {
        return [
            'title.required' => trans('page::messages.title is required'),
            'body.required' => trans('page::messages.body is required'),
        ];
    }
}

{'fraction_non_alphanumeric': 0.13520408163265307, 'fraction_numerical': 0.0, 'mean_word_length': 2.2817294281729428, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '3085649', 'n_tokens_mistral': 628, 'n_tokens_neox': 617, 'n_words': 122}