| Total Complexity | 6 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class StorageStatisticsByFileType extends TdObject |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'storageStatisticsByFileType'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * File type. |
||
| 20 | * |
||
| 21 | * @var FileType |
||
| 22 | */ |
||
| 23 | protected FileType $fileType; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Total size of the files. |
||
| 27 | * |
||
| 28 | * @var int |
||
| 29 | */ |
||
| 30 | protected int $size; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Total number of files. |
||
| 34 | * |
||
| 35 | * @var int |
||
| 36 | */ |
||
| 37 | protected int $count; |
||
| 38 | |||
| 39 | public function __construct(FileType $fileType, int $size, int $count) |
||
| 44 | } |
||
| 45 | |||
| 46 | public static function fromArray(array $array): StorageStatisticsByFileType |
||
| 47 | { |
||
| 48 | return new static( |
||
| 49 | TdSchemaRegistry::fromArray($array['file_type']), |
||
| 50 | $array['size'], |
||
| 51 | $array['count'], |
||
| 52 | ); |
||
| 53 | } |
||
| 54 | |||
| 55 | public function typeSerialize(): array |
||
| 62 | ]; |
||
| 63 | } |
||
| 64 | |||
| 65 | public function getFileType(): FileType |
||
| 66 | { |
||
| 67 | return $this->fileType; |
||
| 68 | } |
||
| 69 | |||
| 70 | public function getSize(): int |
||
| 73 | } |
||
| 74 | |||
| 75 | public function getCount(): int |
||
| 78 | } |
||
| 79 | } |
||
| 80 |