ListImported::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Mail;
4
5
use App\Models\MailingList;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
10
/**
11
 * @property MailingList list
12
 */
13
class ListImported extends Mailable
14
{
15
    use Queueable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Mail\ListImported: $id, $class, $relations
Loading history...
16
17
    public $list;
18
19
    /**
20
     * ListImported constructor.
21
     * @param MailingList $list
22
     */
23
    public function __construct(MailingList $list)
24
    {
25
        $this->list = $list;
26
    }
27
28
    /**
29
     * Build the message.
30
     *
31
     * @return $this
32
     */
33
    public function build()
34
    {
35
        return $this->markdown('emails.lists.imported')
36
            ->subject(trans('emails.lists.imported.subject'))
0 ignored issues
show
Bug introduced by
It seems like trans('emails.lists.imported.subject') can also be of type array; however, parameter $subject of Illuminate\Mail\Mailable::subject() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

36
            ->subject(/** @scrutinizer ignore-type */ trans('emails.lists.imported.subject'))
Loading history...
37
            ->with(['list' => $this->list]);
38
    }
39
}
40