Completed
Pull Request — master (#7)
by
unknown
02:02 queued 47s
created

BugMail::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace FlyingLuscas\BugNotifier\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
10
class BugMail extends Mailable implements ShouldQueue
11
{
12
    use Queueable, SerializesModels;
13
14
    public $view;
15
    public $subject;
16
    public $body;
17
18
    /**
19
     * Create a new message instance.
20
     *
21
     * @param Illuminate\View\View $view
22
     * @param string $subject
23
     * @param string $body
24
     *
25
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
26
     */
27
    public function __construct($view, $subject, $body)
28
    {
29
        $this->view = $view;
30
        $this->subject = $subject;
31
        $this->body = $body;
32
    }
33
34
    /**
35
     * Build the message.
36
     *
37
     * @return $this
38
     */
39
    public function build()
40
    {
41
        return $this->view($this->view)
42
            ->subject($this->subject);
43
    }
44
}