MailFormBuilderEntry   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
A __construct() 0 4 1
1
<?php
2
3
namespace MedianetDev\BackpackForm\Mail;
4
5
use Illuminate\Mail\Mailable;
6
7
class MailFormBuilderEntry extends Mailable
8
{
9
    /**
10
     * The order instance.
11
     */
12
    public $dataMail;
13
    public $view;
14
    /**
15
     * Create a new message instance.
16
     *
17
     * @param  $data
18
     * @return void
19
     */
20
    public function __construct(string $view, array $data)
21
    {
22
        $this->dataMail = $data;
23
        $this->view = $view;
24
    }
25
    /**
26
     * Build the message.
27
     *
28
     * @return $this
29
     */
30
    public function build()
31
    {
32
        return $this->from(config('backpack-form.email.from'))
33
                    ->view($this->view);
34
    }
35
}
36