@@ -18,7 +18,7 @@ |
||
18 | 18 | public string $address; |
19 | 19 | |
20 | 20 | |
21 | - public function __construct(stdClass|null $object = null) { |
|
21 | + public function __construct(stdClass | null $object = null) { |
|
22 | 22 | if ($object != null) { |
23 | 23 | parent::__construct($object, self::subs); |
24 | 24 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public int $file_size; |
34 | 34 | |
35 | 35 | |
36 | - public function __construct(stdClass|null $object = null) { |
|
36 | + public function __construct(stdClass | null $object = null) { |
|
37 | 37 | if ($object != null) { |
38 | 38 | parent::__construct($object, self::subs); |
39 | 39 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public string $big_file_unique_id; |
37 | 37 | |
38 | 38 | |
39 | - public function __construct(stdClass|null $object = null) { |
|
39 | + public function __construct(stdClass | null $object = null) { |
|
40 | 40 | if ($object != null) { |
41 | 41 | parent::__construct($object, self::subs); |
42 | 42 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public bool $can_pin_messages; |
65 | 65 | |
66 | 66 | |
67 | - public function __construct(stdClass|null $object = null) { |
|
67 | + public function __construct(stdClass | null $object = null) { |
|
68 | 68 | if ($object != null) { |
69 | 69 | parent::__construct($object, self::subs); |
70 | 70 | } |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | $this->$key[$sub_key][] = new ($subs['array']['array'][$key]) ($sub2_value); |
27 | 27 | } |
28 | 28 | } |
29 | - else{ |
|
29 | + else { |
|
30 | 30 | $this->$key[] = new ($subs['array'][$key]) ($sub_value); |
31 | 31 | } |
32 | 32 | } |
33 | 33 | } |
34 | - else{ |
|
34 | + else { |
|
35 | 35 | $this->$key = $value; |
36 | 36 | if (ucfirst($key) === basename(get_class($this)).'_id') { |
37 | 37 | $this->{'id'} = $value; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function __call(string $name, array $arguments) { |
46 | 46 | $name = strtolower($name); |
47 | 47 | if (str_starts_with($name, 'set')) { |
48 | - $name = substr($name,3); |
|
48 | + $name = substr($name, 3); |
|
49 | 49 | if (isset($arguments[0])) { |
50 | 50 | $this->$name = $arguments[0]; |
51 | 51 | } |
@@ -17,21 +17,18 @@ discard block |
||
17 | 17 | foreach ($object as $key=>$value) { |
18 | 18 | if (isset($subs[$key])) { |
19 | 19 | $this->$key = new ($subs[$key]) ($value); |
20 | - } |
|
21 | - else { |
|
20 | + } else { |
|
22 | 21 | if (is_array($value)) { |
23 | 22 | foreach ($value as $sub_key=>$sub_value) { |
24 | 23 | if (is_array($sub_value)) { |
25 | 24 | foreach ($sub_value as $sub2_value) { |
26 | 25 | $this->$key[$sub_key][] = new ($subs['array']['array'][$key]) ($sub2_value); |
27 | 26 | } |
28 | - } |
|
29 | - else{ |
|
27 | + } else{ |
|
30 | 28 | $this->$key[] = new ($subs['array'][$key]) ($sub_value); |
31 | 29 | } |
32 | 30 | } |
33 | - } |
|
34 | - else{ |
|
31 | + } else{ |
|
35 | 32 | $this->$key = $value; |
36 | 33 | if (ucfirst($key) === basename(get_class($this)).'_id') { |
37 | 34 | $this->{'id'} = $value; |
@@ -48,8 +45,7 @@ discard block |
||
48 | 45 | $name = substr($name,3); |
49 | 46 | if (isset($arguments[0])) { |
50 | 47 | $this->$name = $arguments[0]; |
51 | - } |
|
52 | - elseif (isset($arguments['value'])) { |
|
48 | + } elseif (isset($arguments['value'])) { |
|
53 | 49 | $this->$name = $arguments['value']; |
54 | 50 | } |
55 | 51 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | public photoSize $thumb; |
47 | 47 | |
48 | 48 | |
49 | - public function __construct(stdClass|null $object = null) { |
|
49 | + public function __construct(stdClass | null $object = null) { |
|
50 | 50 | if ($object != null) { |
51 | 51 | parent::__construct($object, self::subs); |
52 | 52 | } |
@@ -139,13 +139,13 @@ discard block |
||
139 | 139 | public string $text; |
140 | 140 | |
141 | 141 | /** Optional. If user message was a commend , this parameter will be the commend */ |
142 | - public string|null $commend; |
|
142 | + public string | null $commend; |
|
143 | 143 | |
144 | 144 | /** Optional. If user message was a commend , this parameter will be the commend username(if exist) */ |
145 | - public string|null $commend_username; |
|
145 | + public string | null $commend_username; |
|
146 | 146 | |
147 | 147 | /** Optional. If user message was a commend , this parameter will be the commend payload(if exist) */ |
148 | - public string|null $commend_payload; |
|
148 | + public string | null $commend_payload; |
|
149 | 149 | |
150 | 150 | /** |
151 | 151 | * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | public inlineKeyboardMarkup $reply_markup; |
319 | 319 | |
320 | 320 | |
321 | - public function __construct(stdClass|null $object = null) { |
|
321 | + public function __construct(stdClass | null $object = null) { |
|
322 | 322 | if ($object != null) { |
323 | 323 | parent::__construct($object, self::subs); |
324 | 324 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public int $file_size; |
34 | 34 | |
35 | 35 | |
36 | - public function __construct(stdClass|null $object = null) { |
|
36 | + public function __construct(stdClass | null $object = null) { |
|
37 | 37 | if ($object != null) { |
38 | 38 | parent::__construct($object, self::subs); |
39 | 39 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public shippingAddress $shipping_address; |
25 | 25 | |
26 | 26 | |
27 | - public function __construct(stdClass|null $object = null) { |
|
27 | + public function __construct(stdClass | null $object = null) { |
|
28 | 28 | if ($object != null) { |
29 | 29 | parent::__construct($object, self::subs); |
30 | 30 | } |