ListImported   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 5 1
A __construct() 0 3 1
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