Completed
Push — master ( 1f7e67...a1b9db )
by
unknown
07:31
created

AnswerPreCheckoutQuery   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 91
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 91
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getOk() 0 4 1
A setOk() 0 4 1
A getErrorMessage() 0 4 1
A setErrorMessage() 0 4 1
A getPreCheckoutQueryId() 0 4 1
A setPreCheckoutQueryId() 0 4 1
1
<?php
2
3
namespace TelegramBot\Api\Types\Payments\Query;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\Types\Payments\ArrayOfLabeledPrice;
7
8
/**
9
 * Class AnswerPreCheckoutQuery
10
 * Use this method to respond to such pre-checkout queries.
11
 *
12
 * @package TelegramBot\Api\Types\Payments\Query
13
 */
14
class AnswerPreCheckoutQuery extends BaseType
15
{
16
    /**
17
     * @var array
18
     */
19
    static protected $requiredParams = ['pre_checkout_query_id', 'ok'];
20
21
    /**
22
     * @var array
23
     */
24
    static protected $map = [
25
        'pre_checkout_query_id' => true,
26
        'ok' => true,
27
        'error_message' => true,
28
    ];
29
30
    /**
31
     * Unique identifier for the query to be answered
32
     *
33
     * @var string
34
     */
35
    protected $preCheckoutQueryId;
36
37
    /**
38
     * Specify True if everything is alright
39
     *
40
     * @var bool
41
     */
42
    protected $ok;
43
44
    /**
45
     * Error message in human readable form that explains the reason for failure to proceed with the checkout
46
     *
47
     * @var string
48
     */
49
    protected $errorMessage;
50
51
    /**
52
     * @author MY
53
     * @return true
54
     */
55
    public function getOk()
56
    {
57
        return $this->ok;
58
    }
59
60
    /**
61
     * @author MY
62
     * @param true $ok
63
     */
64
    public function setOk($ok)
65
    {
66
        $this->ok = $ok;
0 ignored issues
show
Documentation Bug introduced by
It seems like $ok of type object<TelegramBot\Api\Types\Payments\Query\true> is incompatible with the declared type boolean of property $ok.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
67
    }
68
69
    /**
70
     * @author MY
71
     * @return string
72
     */
73
    public function getErrorMessage()
74
    {
75
        return $this->errorMessage;
76
    }
77
78
    /**
79
     * @author MY
80
     * @param string $errorMessage
81
     */
82
    public function setErrorMessage($errorMessage)
83
    {
84
        $this->errorMessage = $errorMessage;
85
    }
86
87
    /**
88
     * @author MY
89
     * @return string
90
     */
91
    public function getPreCheckoutQueryId()
92
    {
93
        return $this->preCheckoutQueryId;
94
    }
95
96
    /**
97
     * @author MY
98
     * @param string $preCheckoutQueryId
99
     */
100
    public function setPreCheckoutQueryId($preCheckoutQueryId)
101
    {
102
        $this->preCheckoutQueryId = $preCheckoutQueryId;
103
    }
104
}
105