Completed
Push — master ( bb86ee...4db16d )
by Loïc
02:12 queued 12s
created

AdminUser   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 58
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getLastName() 0 4 1
A setLastName() 0 4 1
A getFirstName() 0 4 1
A setFirstName() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Entity\User;
13
14
use Doctrine\ORM\Mapping as ORM;
15
use Sylius\Component\User\Model\User as BaseUser;
16
17
/**
18
 * @ORM\Entity
19
 * @ORM\Table("sylius_admin_user")
20
 */
21
class AdminUser extends BaseUser implements AdminUserInterface
22
{
23
    /**
24
     * @var string
25
     *
26
     * @ORM\Column(type="string", nullable=true)
27
     */
28
    protected $lastName;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(type="string", nullable=true)
34
     */
35
    protected $firstName;
36
37
    /**
38
     * AdminUser constructor.
39
     */
40
    public function __construct()
41
    {
42
        parent::__construct();
43
44
        $this->roles = [self::DEFAULT_ADMIN_ROLE];
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getLastName(): ?string
51
    {
52
        return $this->lastName;
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function setLastName(?string $lastName): void
59
    {
60
        $this->lastName = $lastName;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function getFirstName(): ?string
67
    {
68
        return $this->firstName;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function setFirstName(?string $firstName): void
75
    {
76
        $this->firstName = $firstName;
77
    }
78
}
79