Passed
Pull Request — master (#50)
by Ronan
09:06
created

InvitationMail   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
namespace App\Mail\User;
4
5
use App\Mail\Email;
6
use App\Model\Customer;
0 ignored issues
show
Bug introduced by
The type App\Model\Customer 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 App\Model\User;
8
9
/**
10
 * Email sent to invite a user to sign up
11
 *
12
 * @author Ronan Chilvers <[email protected]>
13
 */
14
class InvitationMail extends Email
15
{
16
    /**
17
     * Class constructor
18
     *
19
     * @param App\Model\User $user The user to send the invitation to
0 ignored issues
show
Bug introduced by
The type App\Mail\User\App\Model\User was not found. Did you mean App\Model\User? If so, make sure to prefix the type with \.
Loading history...
20
     * @author Ronan Chilvers <[email protected]>
21
     */
22
    public function __construct(
23
        User $user
24
    ) {
25
        $this
26
            ->addTo($user->email)
27
            ->setSubject('Invitation to deploy!')
28
            ->addTemplateContext(
29
                'user',
30
                $user
31
            );
32
    }
33
}
34