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...
11
{
12
13
/**
14
* @var string
15
*/
16
private $merchantId;
17
18
/**
19
* @var string
20
*/
21
private $payId;
22
23
/**
24
* @var int|null
25
*/
26
private $amount;
27
28
2
public function __construct(
29
string $merchantId,
30
string $payId,
31
int $amount = null
32
)
33
{
34
2
Validator::checkPayId($payId);
35
36
2
$this->merchantId = $merchantId;
37
2
$this->payId = $payId;
38
2
$this->amount = $amount;
39
2
}
40
41
1
public function send(ApiClient $apiClient): PaymentResponse
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.