| Total Complexity | 7 |
| Total Lines | 105 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class User extends AbstractEntity |
||
| 11 | { |
||
| 12 | private const EXAMPLE = <<<JSON |
||
| 13 | { |
||
| 14 | "_": "user", |
||
| 15 | "self": false, |
||
| 16 | "contact": true, |
||
| 17 | "mutual_contact": false, |
||
| 18 | "deleted": false, |
||
| 19 | "bot": false, |
||
| 20 | "bot_chat_history": false, |
||
| 21 | "bot_nochats": false, |
||
| 22 | "verified": false, |
||
| 23 | "restricted": false, |
||
| 24 | "min": false, |
||
| 25 | "bot_inline_geo": false, |
||
| 26 | "id": 123, |
||
| 27 | "access_hash": 123, |
||
| 28 | "first_name": "Ivan", |
||
| 29 | "last_name": "Ivanov", |
||
| 30 | "phone": "7534534535", |
||
| 31 | "photo": { |
||
| 32 | "_": "userProfilePhoto", |
||
| 33 | "photo_id": 1, |
||
| 34 | "photo_small": { |
||
| 35 | "_": "fileLocation", |
||
| 36 | "dc_id": 2, |
||
| 37 | "volume_id": 1, |
||
| 38 | "local_id": 1, |
||
| 39 | "secret": -1 |
||
| 40 | }, |
||
| 41 | "photo_big": { |
||
| 42 | "_": "fileLocation", |
||
| 43 | "dc_id": 2, |
||
| 44 | "volume_id": 1, |
||
| 45 | "local_id": 1, |
||
| 46 | "secret": -1 |
||
| 47 | } |
||
| 48 | }, |
||
| 49 | "status": { |
||
| 50 | "_": "userStatusRecently" |
||
| 51 | } |
||
| 52 | } |
||
| 53 | JSON; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @Serializer\Type("integer") |
||
| 57 | * |
||
| 58 | * @var int |
||
| 59 | */ |
||
| 60 | private $id; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @Serializer\Type("string") |
||
| 64 | * |
||
| 65 | * @var string |
||
| 66 | */ |
||
| 67 | private $first_name; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @Serializer\Type("string") |
||
| 71 | * |
||
| 72 | * @var string |
||
| 73 | */ |
||
| 74 | private $last_name; |
||
| 75 | |||
| 76 | public function getId(): int |
||
| 77 | { |
||
| 78 | return $this->id; |
||
| 79 | } |
||
| 80 | |||
| 81 | public function setId(int $id): self |
||
| 82 | { |
||
| 83 | $this->id = $id; |
||
| 84 | |||
| 85 | return $this; |
||
| 86 | } |
||
| 87 | |||
| 88 | public function getFullName(): string |
||
| 89 | { |
||
| 90 | return $this->first_name . ' ' . $this->last_name; |
||
| 91 | } |
||
| 92 | |||
| 93 | public function getFirstName(): string |
||
| 94 | { |
||
| 95 | return $this->first_name; |
||
| 96 | } |
||
| 97 | |||
| 98 | public function setFirstName(string $first_name): self |
||
| 99 | { |
||
| 100 | $this->first_name = $first_name; |
||
| 101 | |||
| 102 | return $this; |
||
| 103 | } |
||
| 104 | |||
| 105 | public function getLastName(): string |
||
| 108 | } |
||
| 109 | |||
| 110 | public function setLastName(string $last_name): self |
||
| 115 | } |
||
| 116 | } |
||
| 117 |