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