The expression trans($this->message); of type Illuminate\Contracts\Tra...lator|string|array|null adds the type Illuminate\Contracts\Translation\Translator to the return on line 50 which is incompatible with the return type declared by the interface Illuminate\Contracts\Validation\Rule::message of type string|array.