This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
9
{
10
/** @var string */
11
public $amount;
12
13
/** @var string */
14
public $description;
15
16
/** @var \WeDevBr\Bankly\Types\Pix\BankAccount */
17
public $sender;
18
19
/** @var \WeDevBr\Bankly\Types\Pix\BankAccount */
20
public $recipient;
21
22
/**
23
* [Manual, Key, StaticQrCode, DynamicQrCode]
24
* @var string
25
*/
26
public $initializationType = 'StaticQrCode';
27
28
/** @var string */
29
public $endToEndId;
30
31
/**
32
* This validate and return an array
33
* @return array
34
*/
35
public function toArray(): array
36
{
37
$this->validate();
38
return json_decode(json_encode($this), true);
39
}
40
41
/**
42
* This function validate the PixCashoutStaticQrCode type
43
*
44
* @return void
45
*/
46
public function validate(): void
47
{
48
$pixCashout = new PixCashoutStaticQrCodeValidator($this);
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.