Code Duplication    Length = 14-14 lines in 2 locations

src/Http/Requests/MailCareRequest.php 1 location

@@ 9-22 (lines=14) @@
6
use Illuminate\Support\Facades\Validator;
7
use Illuminate\Foundation\Http\FormRequest;
8
9
class MailCareRequest extends FormRequest
10
{
11
    public function validator()
12
    {
13
        return Validator::make($this->all(), [
14
            'email' => 'required',
15
        ]);
16
    }
17
18
    public function email()
19
    {
20
        return InboundEmail::fromMessage($this->get('email'));
21
    }
22
}
23

src/Http/Requests/SendGridRequest.php 1 location

@@ 9-22 (lines=14) @@
6
use Illuminate\Support\Facades\Validator;
7
use Illuminate\Foundation\Http\FormRequest;
8
9
class SendGridRequest extends FormRequest
10
{
11
    public function validator()
12
    {
13
        return Validator::make($this->all(), [
14
            'email' => 'required',
15
        ]);
16
    }
17
18
    public function email()
19
    {
20
        return InboundEmail::fromMessage($this->get('email'));
21
    }
22
}
23