Completed
Push — user-bundle-roles-adjustments ( 521745 )
by
unknown
05:31
created

User::getRoles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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);
0 ignored issues
show
Bug introduced by
It seems like $token defined by parameter $token on line 20 can also be of type object<SumoCoders\Framew...ity\PasswordResetToken>; however, SumoCoders\FrameworkMult...BaseUser::__construct() does only seem to accept null|integer, maybe add an additional type check?

This check looks at variables that have been passed in as parameters and are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
23
    }
24
}
25