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\CardIdInterface; |
||
14 | use Magento\Framework\Api\AbstractSimpleObject; |
||
15 | |||
16 | /** |
||
17 | * Class Card Id - Model data. |
||
18 | */ |
||
19 | class CardId extends AbstractSimpleObject implements CardIdInterface |
||
20 | { |
||
21 | /** |
||
22 | * @inheritdoc |
||
23 | */ |
||
24 | public function getCardId() |
||
25 | { |
||
26 | return $this->_get(CardIdInterface::GETNET_CARD_ID); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | public function setCardId($cardId) |
||
33 | { |
||
34 | return $this->setData(CardIdInterface::GETNET_CARD_ID, $cardId); |
||
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: