getnet-adquirencia /
payment-magento
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Copyright © Getnet. All rights reserved. |
||
| 4 | * |
||
| 5 | * @author Bruno Elisei <[email protected]> |
||
| 6 | * See LICENSE for license details. |
||
| 7 | */ |
||
| 8 | |||
| 9 | declare(strict_types=1); |
||
| 10 | |||
| 11 | namespace Getnet\PaymentMagento\Model\Data; |
||
| 12 | |||
| 13 | use Getnet\PaymentMagento\Api\Data\NumberTokenInterface; |
||
| 14 | use Magento\Framework\Api\AbstractSimpleObject; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Class Number Token - Model data. |
||
| 18 | */ |
||
| 19 | class NumberToken extends AbstractSimpleObject implements NumberTokenInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @inheritdoc |
||
| 23 | */ |
||
| 24 | public function getCardNumber() |
||
| 25 | { |
||
| 26 | return $this->_get(NumberTokenInterface::GETNET_CARD_NUMBER); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | public function setCardNumber($cardNumber) |
||
| 33 | { |
||
| 34 | return $this->setData(NumberTokenInterface::GETNET_CARD_NUMBER, $cardNumber); |
||
|
0 ignored issues
–
show
|
|||
| 35 | } |
||
| 36 | } |
||
| 37 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: