| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace ByTIC\Payments\Stripe\Message\Traits; |
||||
| 4 | |||||
| 5 | use Omnipay\Common\Message\AbstractRequest; |
||||
| 6 | use Omnipay\Common\Message\AbstractRequest as CommonAbstractRequest; |
||||
| 7 | |||||
| 8 | /** |
||||
| 9 | * Trait HasKeysTrait |
||||
| 10 | * @package ByTIC\Payments\Stripe\Message\Traits |
||||
| 11 | */ |
||||
| 12 | trait HasKeysTrait |
||||
| 13 | { |
||||
| 14 | /** |
||||
| 15 | * @return mixed |
||||
| 16 | */ |
||||
| 17 | public function getPublicKey() |
||||
| 18 | { |
||||
| 19 | return $this->getParameter('publicKey'); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 20 | } |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * @param $value |
||||
| 24 | * @return CommonAbstractRequest |
||||
| 25 | */ |
||||
| 26 | public function setPublicKey($value) |
||||
| 27 | { |
||||
| 28 | return $this->setParameter('publicKey', $value); |
||||
|
0 ignored issues
–
show
It seems like
setParameter() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 29 | } |
||||
| 30 | |||||
| 31 | /** |
||||
| 32 | * Get the gateway API Key (the "secret key"). |
||||
| 33 | * |
||||
| 34 | * @return string |
||||
| 35 | */ |
||||
| 36 | public function getApiKey(): string |
||||
| 37 | { |
||||
| 38 | return $this->getParameter('apiKey'); |
||||
| 39 | } |
||||
| 40 | |||||
| 41 | /** |
||||
| 42 | * Set the gateway API Key. |
||||
| 43 | * |
||||
| 44 | * @return AbstractRequest provides a fluent interface. |
||||
| 45 | */ |
||||
| 46 | public function setApiKey($value): AbstractRequest |
||||
| 47 | { |
||||
| 48 | return $this->setParameter('apiKey', $value); |
||||
| 49 | } |
||||
| 50 | } |
||||
| 51 |