|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace BPT\types; |
|
4
|
|
|
|
|
5
|
|
|
use BPT\telegram\telegram; |
|
6
|
|
|
use stdClass; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* This object contains information about an incoming shipping query. |
|
10
|
|
|
*/ |
|
11
|
|
|
class shippingQuery extends types { |
|
|
|
|
|
|
12
|
|
|
/** Keep all of properties which has sub properties */ |
|
13
|
|
|
private const subs = ['from' => 'BPT\types\user', 'shipping_address' => 'BPT\types\shippingAddress']; |
|
14
|
|
|
|
|
15
|
|
|
/** Unique query identifier */ |
|
16
|
|
|
public string $id; |
|
17
|
|
|
|
|
18
|
|
|
/** User who sent the query */ |
|
19
|
|
|
public user $from; |
|
20
|
|
|
|
|
21
|
|
|
/** Bot specified invoice payload */ |
|
22
|
|
|
public string $invoice_payload; |
|
23
|
|
|
|
|
24
|
|
|
/** User specified shipping address */ |
|
25
|
|
|
public shippingAddress $shipping_address; |
|
26
|
|
|
|
|
27
|
|
|
|
|
28
|
|
|
public function __construct(stdClass|null $object = null) { |
|
29
|
|
|
if ($object != null) { |
|
30
|
|
|
parent::__construct($object, self::subs); |
|
31
|
|
|
} |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API |
|
36
|
|
|
* will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. |
|
37
|
|
|
* On success, True is returned. |
|
38
|
|
|
* |
|
39
|
|
|
* @param bool $ok |
|
40
|
|
|
* @param null|array $shipping_options |
|
41
|
|
|
* @param null|string $error_message |
|
42
|
|
|
* @param bool|null $answer |
|
43
|
|
|
* |
|
44
|
|
|
* @return responseError|bool |
|
45
|
|
|
*/ |
|
46
|
|
|
public function answer (bool $ok, null|array $shipping_options = null, string|null $error_message = null, bool $answer = null): responseError|bool { |
|
47
|
|
|
return telegram::answerShippingQuery($ok, $this->id, $shipping_options, $error_message, answer: $answer); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths