Completed
Push — master ( f7e56f...c1baaf )
by Sean
01:15
created

TestMailable::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Resohead\LaravelTestMail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
10
class TestMailable extends Mailable
11
{
12
    use Queueable, SerializesModels;
13
14
    public $recipient;
15
16
    /**
17
     * Create a new message instance.
18
     *
19
     * @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...
20
     */
21
    public function __construct(String $recipient)
22
    {
23
        $this->recipient = $recipient;
24
    }
25
26
    /**
27
     * Build the message.
28
     *
29
     * @return $this
30
     */
31
    public function build()
32
    {
33
        return $this->subject('Test email from '. config('app.name'))
34
            ->to($this->recipient)
35
            ->markdown('laravel-test-mail::emails.test');
36
    }
37
}
38