ContactFormSubmitted   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 30
rs 10
wmc 2
lcom 1
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A build() 0 7 1
1
<?php
2
3
namespace App\Mail;
4
5
use App\Models\FormResponse;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
use Illuminate\Contracts\Queue\ShouldQueue;
10
11
class ContactFormSubmitted extends Mailable implements ShouldQueue
12
{
13
    use Queueable, SerializesModels;
14
15
    /** @var \App\Models\FormResponse */
16
    public $formResponse;
17
18
    /**
19
     * Create a new message instance.
20
     *
21
     * @param \App\Models\FormResponse $formResponse
22
     */
23
    public function __construct(FormResponse $formResponse)
24
    {
25
        $this->formResponse = $formResponse;
26
    }
27
28
    /**
29
     * Build the message.
30
     *
31
     * @return $this
32
     */
33
    public function build()
34
    {
35
        return $this
36
            ->to(config('mail.recipients.questionForm'))
37
            ->subject('Een nieuwe reactie op '.config('app.url'))
38
            ->view('mails.admin.contactFormSubmitted');
39
    }
40
}
41