| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | final class User extends AbstractModel implements \Ecodev\Felix\Model\User |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @ORM\Column(name="custom_column_name", type="string", length=50, options={"default" = ""}) |
||
| 21 | */ |
||
| 22 | private string $name = ''; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @ORM\Column(type="string", length=50, nullable=true) |
||
| 26 | */ |
||
| 27 | private ?string $email = null; |
||
|
|
|||
| 28 | |||
| 29 | /** |
||
| 30 | * @ORM\Column(name="password", type="string", length=255) |
||
| 31 | * @Api\Exclude |
||
| 32 | */ |
||
| 33 | private string $password; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @ORM\OneToMany(targetEntity="EcodevTests\Felix\Blog\Model\Post", mappedBy="user") |
||
| 37 | */ |
||
| 38 | private Collection $posts; |
||
| 39 | |||
| 40 | public function __construct(private MultipleRoles|string $role = 'member') |
||
| 41 | { |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getName(): string |
||
| 45 | { |
||
| 46 | return $this->name; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function setName(string $name): void |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getRole(): string|MultipleRoles |
||
| 55 | { |
||
| 56 | return $this->role; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getLogin(): ?string |
||
| 62 | } |
||
| 63 | } |
||
| 64 |