Completed
Pull Request — master (#202)
by
unknown
07:29
created

User::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 5
1
<?php
2
3
namespace SumoCoders\FrameworkUserBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use SumoCoders\FrameworkMultiUserBundle\Entity\BaseUser;
7
use SumoCoders\FrameworkMultiUserBundle\Security\PasswordResetToken;
8
9
/**
10
 * @ORM\Entity(repositoryClass="SumoCoders\FrameworkUserBundle\Repository\UserRepository")
11
 * @ORM\Table()
12
 */
13
class User extends BaseUser
14
{
15
    public function __construct(
16
        string $plainPassword,
17
        string $displayName,
18
        string $email,
19
        int $id = null,
20
        PasswordResetToken $token = null
21
    ) {
22
        parent::__construct($email, $plainPassword, $displayName, $email, $id, $token);
23
    }
24
25
    public function getRoles(): array
26
    {
27
        return ['ROLE_USER'];
28
    }
29
}
30