| Total Complexity | 5 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class UserProfilePhotos extends TdObject |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'userProfilePhotos'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Total number of user profile photos. |
||
| 20 | */ |
||
| 21 | protected int $totalCount; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * A list of photos. |
||
| 25 | * |
||
| 26 | * @var UserProfilePhoto[] |
||
| 27 | */ |
||
| 28 | protected array $photos; |
||
| 29 | |||
| 30 | public function __construct(int $totalCount, array $photos) |
||
| 31 | { |
||
| 32 | $this->totalCount = $totalCount; |
||
| 33 | $this->photos = $photos; |
||
| 34 | } |
||
| 35 | |||
| 36 | public static function fromArray(array $array): UserProfilePhotos |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function typeSerialize(): array |
||
| 45 | { |
||
| 46 | return [ |
||
| 47 | '@type' => static::TYPE_NAME, |
||
| 48 | 'total_count' => $this->totalCount, |
||
| 49 | array_map(fn ($x) => $x->typeSerialize(), $this->photos), |
||
| 50 | ]; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getTotalCount(): int |
||
| 54 | { |
||
| 55 | return $this->totalCount; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getPhotos(): array |
||
| 61 | } |
||
| 62 | } |
||
| 63 |