| 1 | <?php |
||
| 13 | trait PayPalPaymentMethodTrait |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $paypalPayerId; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $paypalPayerEmail; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $paypalPayerStatus; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | private $paypalAddressStatus; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | private $paypalProtectionEligibility; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | private $paypalPaymentStatus; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | 1 | public function getPaypalPayerId() |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $paypalPayerId |
||
| 55 | * |
||
| 56 | * @return PayPalPaymentMethodTrait |
||
|
1 ignored issue
–
show
|
|||
| 57 | */ |
||
| 58 | 1 | public function setPaypalPayerId($paypalPayerId) |
|
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | 1 | public function getPaypalPayerEmail() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @param string $paypalPayerEmail |
||
| 75 | * |
||
| 76 | * @return PayPalPaymentMethodTrait |
||
|
1 ignored issue
–
show
|
|||
| 77 | */ |
||
| 78 | 2 | public function setPaypalPayerEmail($paypalPayerEmail) |
|
| 88 | |||
| 89 | /** |
||
| 90 | * @return string |
||
| 91 | */ |
||
| 92 | 1 | public function getPaypalPayerStatus() |
|
| 96 | |||
| 97 | /** |
||
| 98 | * @param string $paypalPayerStatus |
||
| 99 | * |
||
| 100 | * @return PayPalPaymentMethodTrait |
||
|
1 ignored issue
–
show
|
|||
| 101 | */ |
||
| 102 | 1 | public function setPaypalPayerStatus($paypalPayerStatus) |
|
| 108 | |||
| 109 | /** |
||
| 110 | * @return string |
||
| 111 | */ |
||
| 112 | 1 | public function getPaypalAddressStatus() |
|
| 116 | |||
| 117 | /** |
||
| 118 | * @param string $paypalAddressStatus |
||
| 119 | * |
||
| 120 | * @return PayPalPaymentMethodTrait |
||
|
1 ignored issue
–
show
|
|||
| 121 | */ |
||
| 122 | 1 | public function setPaypalAddressStatus($paypalAddressStatus) |
|
| 128 | |||
| 129 | /** |
||
| 130 | * @return string |
||
| 131 | */ |
||
| 132 | 1 | public function getPaypalProtectionEligibility() |
|
| 136 | |||
| 137 | /** |
||
| 138 | * @param string $paypalProtectionEligibility |
||
| 139 | * |
||
| 140 | * @return PayPalPaymentMethodTrait |
||
|
1 ignored issue
–
show
|
|||
| 141 | */ |
||
| 142 | 1 | public function setPaypalProtectionEligibility($paypalProtectionEligibility) |
|
| 148 | |||
| 149 | /** |
||
| 150 | * @return string |
||
| 151 | */ |
||
| 152 | 1 | public function getPaypalPaymentStatus() |
|
| 156 | |||
| 157 | /** |
||
| 158 | * @param string $paypalPaymentStatus |
||
| 159 | * |
||
| 160 | * @return PayPalPaymentMethodTrait |
||
|
1 ignored issue
–
show
|
|||
| 161 | */ |
||
| 162 | 1 | public function setPaypalPaymentStatus($paypalPaymentStatus) |
|
| 168 | } |
||
| 169 |
In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.
If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.