| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class AddNetworkStatistics extends TdFunction |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'addNetworkStatistics'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The network statistics entry with the data to be added to statistics. |
||
| 20 | * |
||
| 21 | * @var NetworkStatisticsEntry |
||
| 22 | */ |
||
| 23 | protected NetworkStatisticsEntry $entry; |
||
| 24 | |||
| 25 | public function __construct(NetworkStatisticsEntry $entry) |
||
| 26 | { |
||
| 27 | $this->entry = $entry; |
||
| 28 | } |
||
| 29 | |||
| 30 | public static function fromArray(array $array): AddNetworkStatistics |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function typeSerialize(): array |
||
| 38 | { |
||
| 39 | return [ |
||
| 40 | '@type' => static::TYPE_NAME, |
||
| 41 | 'entry' => $this->entry->typeSerialize(), |
||
| 42 | ]; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getEntry(): NetworkStatisticsEntry |
||
| 48 | } |
||
| 49 | } |
||
| 50 |