1 | <?php |
||
33 | class Payment |
||
34 | { |
||
35 | /** |
||
36 | * Scheme base path. |
||
37 | */ |
||
38 | const SCHEME_PATH = 'weixin://wxpay/bizpayurl'; |
||
39 | |||
40 | /** |
||
41 | * @var API |
||
42 | */ |
||
43 | protected $api; |
||
44 | |||
45 | /** |
||
46 | * Merchant instance. |
||
47 | * |
||
48 | * @var \EasyWeChat\Payment\Merchant |
||
49 | */ |
||
50 | protected $merchant; |
||
51 | |||
52 | /** |
||
53 | * Constructor. |
||
54 | * |
||
55 | * @param Merchant $merchant |
||
56 | */ |
||
57 | 9 | public function __construct(Merchant $merchant) |
|
61 | |||
62 | /** |
||
63 | * Build payment scheme for product. |
||
64 | * |
||
65 | * @param string $productId |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 1 | public function scheme($productId) |
|
83 | |||
84 | /** |
||
85 | * Handle payment notify. |
||
86 | * |
||
87 | * @param callable $callback |
||
88 | * |
||
89 | * @return Response |
||
90 | */ |
||
91 | 2 | public function handleNotify(callable $callback) |
|
118 | |||
119 | /** |
||
120 | * [WeixinJSBridge] Generate js config for payment. |
||
121 | * |
||
122 | * <pre> |
||
123 | * WeixinJSBridge.invoke( |
||
124 | * 'getBrandWCPayRequest', |
||
125 | * ... |
||
126 | * ); |
||
127 | * </pre> |
||
128 | * |
||
129 | * @param string $prepayId |
||
130 | * @param bool $json |
||
131 | * |
||
132 | * @return string|array |
||
133 | */ |
||
134 | 2 | public function configForPayment($prepayId, $json = true) |
|
148 | |||
149 | /** |
||
150 | * [JSSDK] Generate js config for payment. |
||
151 | * |
||
152 | * <pre> |
||
153 | * wx.chooseWXPay({...}); |
||
154 | * </pre> |
||
155 | * |
||
156 | * @param string $prepayId |
||
157 | * @param bool $json |
||
|
|||
158 | * |
||
159 | * @return array|string |
||
160 | */ |
||
161 | 1 | public function configForJSSDKPayment($prepayId) |
|
170 | |||
171 | /** |
||
172 | * Generate app payment parameters. |
||
173 | * |
||
174 | * @param string $prepayId |
||
175 | * |
||
176 | * @return array |
||
177 | */ |
||
178 | 1 | public function configForAppPayment($prepayId) |
|
193 | |||
194 | /** |
||
195 | * Generate js config for share user address. |
||
196 | * |
||
197 | * @param string|\Overtrue\Socialite\AccessTokenInterface $accessToken |
||
198 | * @param bool $json |
||
199 | * |
||
200 | * @return string|array |
||
201 | */ |
||
202 | 1 | public function configForShareAddress($accessToken, $json = true) |
|
230 | |||
231 | /** |
||
232 | * Merchant setter. |
||
233 | * |
||
234 | * @param Merchant $merchant |
||
235 | */ |
||
236 | 1 | public function setMerchant(Merchant $merchant) |
|
240 | |||
241 | /** |
||
242 | * Merchant getter. |
||
243 | * |
||
244 | * @return Merchant |
||
245 | */ |
||
246 | 1 | public function getMerchant() |
|
250 | |||
251 | /** |
||
252 | * Return Notify instance. |
||
253 | * |
||
254 | * @return \EasyWeChat\Payment\Notify |
||
255 | */ |
||
256 | 1 | public function getNotify() |
|
260 | |||
261 | /** |
||
262 | * API setter. |
||
263 | * |
||
264 | * @param API $api |
||
265 | */ |
||
266 | 1 | public function setAPI(API $api) |
|
270 | |||
271 | /** |
||
272 | * Return API instance. |
||
273 | * |
||
274 | * @return API |
||
275 | */ |
||
276 | 1 | public function getAPI() |
|
280 | |||
281 | /** |
||
282 | * Magic call. |
||
283 | * |
||
284 | * @param string $method |
||
285 | * @param array $args |
||
286 | * |
||
287 | * @return mixed |
||
288 | * |
||
289 | * @codeCoverageIgnore |
||
290 | */ |
||
291 | public function __call($method, $args) |
||
297 | } |
||
298 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.