1 | <?php |
||
13 | class PaymentClient extends AbstractAuthenticatedClient |
||
14 | { |
||
15 | /** |
||
16 | * Create a payment |
||
17 | * |
||
18 | * @param Payment $payment |
||
19 | * |
||
20 | * @return Payment |
||
21 | */ |
||
22 | public function createPayment(Payment $payment) |
||
33 | |||
34 | /** |
||
35 | * Execute an approved PayPal payment by Payment |
||
36 | * |
||
37 | * @param Payment $payment |
||
38 | * |
||
39 | * @return Payment |
||
40 | */ |
||
41 | public function executePayment(Payment $payment) |
||
45 | |||
46 | /** |
||
47 | * Execute an approved PayPal payment by payerId and paymentId |
||
48 | * |
||
49 | * @param string $paymentId |
||
50 | * @param string $payerId |
||
51 | * |
||
52 | * @return Payment |
||
53 | */ |
||
54 | public function executePaymentByIds($paymentId, $payerId) |
||
62 | |||
63 | /** |
||
64 | * Look up a payment resource |
||
65 | * |
||
66 | * @param string $paymentId |
||
67 | * |
||
68 | * @return Payment |
||
69 | */ |
||
70 | public function lookupPayment($paymentId) |
||
77 | |||
78 | /** |
||
79 | * @return PaymentList |
||
80 | */ |
||
81 | public function listPayments() |
||
92 | |||
93 | /** |
||
94 | * @param $response |
||
95 | * |
||
96 | * @return Payment |
||
97 | */ |
||
98 | protected function factoryPaymentResponse(Response $response) |
||
102 | } |
||
103 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.