Issues (350)

app/Mail/ResultNotification.php (2 issues)

1
<?php
2
3
namespace App\Mail;
4
5
use App\Models\Course;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
10
class ResultNotification extends Mailable
11
{
12
    use Queueable;
13
    use SerializesModels;
0 ignored issues
show
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Mail\ResultNotification: $id, $relations, $class, $keyBy
Loading history...
14
15
    /**
16
     * Create a new message instance.
17
     *
18
     * @return void
19
     */
20
    public function __construct(public Course $course, public $student)
21
    {
22
    }
23
24
    /**
25
     * Build the message.
26
     *
27
     * @return $this
28
     */
29
    public function build()
30
    {
31
        return $this
32
            ->subject(__('Result Notification'))
0 ignored issues
show
It seems like __('Result Notification') can also be of type array and 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

32
            ->subject(/** @scrutinizer ignore-type */ __('Result Notification'))
Loading history...
33
            ->view('emails.result_notification');
34
    }
35
}
36