1 | <?php |
||
14 | abstract class AbstractHttpClient |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | */ |
||
19 | protected $timeout; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $baseUrl = Paybox::API_URL_TEST; |
||
25 | |||
26 | /** |
||
27 | * @var string[] |
||
28 | */ |
||
29 | private $baseParameters; |
||
30 | |||
31 | /** |
||
32 | * @var int |
||
33 | */ |
||
34 | private $defaultDevise; |
||
35 | |||
36 | /** |
||
37 | * @var int |
||
38 | */ |
||
39 | private $questionNumber; |
||
40 | |||
41 | /** |
||
42 | * Constructor. |
||
43 | */ |
||
44 | final public function __construct() |
||
45 | { |
||
46 | $this->questionNumber = rand(0, time()); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param array $options |
||
51 | */ |
||
52 | final public function setOptions($options) |
||
65 | |||
66 | /** |
||
67 | * Calls PayBox Direct platform with given operation type and parameters. |
||
68 | * |
||
69 | * @param string $type Request type |
||
70 | * @param string[] $parameters Request parameters |
||
71 | * |
||
72 | * @return PayboxResponse The response content |
||
73 | * |
||
74 | * @throws PayboxException |
||
75 | */ |
||
76 | final public function call($type, array $parameters) |
||
105 | |||
106 | /** |
||
107 | * Init and setup http client with PayboxDirectPlus SDK options. |
||
108 | */ |
||
109 | abstract public function init(); |
||
110 | |||
111 | /** |
||
112 | * Sends a request to the server, receive a response and returns it as a string. |
||
113 | * |
||
114 | * @param string[] $parameters Request parameters |
||
115 | * |
||
116 | * @return string The response content |
||
117 | */ |
||
118 | abstract protected function request($parameters); |
||
119 | } |
||
120 |
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..