| 1 | <?php |
||
| 15 | trait Parameters |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Trả về mã Tmn do VNPay cấp. |
||
| 19 | * |
||
| 20 | * @return null|string |
||
| 21 | */ |
||
| 22 | public function getVnpVersion(): ?string |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Thiết lập mã Tmn. |
||
| 29 | * |
||
| 30 | * @param null|string $code |
||
| 31 | * @return $this |
||
| 32 | */ |
||
| 33 | public function setVnpVersion(?string $code) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Trả về mã Tmn do VNPay cấp. |
||
| 40 | * |
||
| 41 | * @return null|string |
||
| 42 | */ |
||
| 43 | public function getVnpTmnCode(): ?string |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Thiết lập mã Tmn. |
||
| 50 | * |
||
| 51 | * @param null|string $code |
||
| 52 | * @return $this |
||
| 53 | */ |
||
| 54 | public function setVnpTmnCode(?string $code) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Trả về khóa dùng để tạo chữ ký dữ liệu. |
||
| 61 | * |
||
| 62 | * @return null|string |
||
| 63 | */ |
||
| 64 | public function getVnpHashSecret(): ?string |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Thiết lập khóa dùng để tạo chữ ký dữ liệu. |
||
| 71 | * |
||
| 72 | * @param null|string $secret |
||
| 73 | * |
||
| 74 | * @return $this |
||
| 75 | */ |
||
| 76 | public function setVnpHashSecret(?string $secret) |
||
| 80 | } |
||
| 81 |
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idableprovides a methodequalsIdthat in turn relies on the methodgetId(). If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()as an abstract method to the trait will make sure it is available.