ContactMailable::build()   A
last analyzed

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
eloc 4
nc 1
nop 0
dl 0
loc 6
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace JamesSingizi\Contact\Mail;
4
5
use Illuminate\Bus\Queueable;
0 ignored issues
show
Bug introduced by
The type Illuminate\Bus\Queueable was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Contracts\Queue\ShouldQueue;
0 ignored issues
show
Bug introduced by
The type Illuminate\Contracts\Queue\ShouldQueue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Illuminate\Mail\Mailable;
0 ignored issues
show
Bug introduced by
The type Illuminate\Mail\Mailable was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Illuminate\Queue\SerializesModels;
0 ignored issues
show
Bug introduced by
The type Illuminate\Queue\SerializesModels was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
class ContactMailable extends Mailable
11
{
12
    use Queueable, SerializesModels;
13
14
    public string $message;
15
    public string $email;
16
    public string $name;
17
18
    /**
19
     * Create a new message instance.
20
     *
21
     * @return void
22
     */
23
    public function __construct(string $message, string $name, string $email)
24
    {
25
        $this->message = $message;
26
        $this->email = $email;
27
        $this->name = $name;
28
    }
29
30
    /**
31
     * Build the message.
32
     *
33
     * @return $this
34
     */
35
    public function build()
36
    {
37
        return $this->markdown('contact::contact.email')->with([
38
            'message'=>$this->message,
39
            'name'=>$this->name,
40
            'email'=>$this->email
41
        ]);
42
    }
43
}
44