1 | <?php |
||||
2 | |||||
3 | namespace Sebdesign\VivaPayments\Responses; |
||||
4 | |||||
5 | use Sebdesign\VivaPayments\Enums\TransactionStatus; |
||||
6 | use Sebdesign\VivaPayments\Enums\TransactionType; |
||||
7 | |||||
8 | class Transaction |
||||
9 | { |
||||
10 | 1 | public function __construct( |
|||
11 | public readonly string $email, |
||||
12 | public readonly int $amount, |
||||
13 | public readonly string $orderCode, |
||||
14 | public readonly TransactionStatus $statusId, |
||||
15 | public readonly string $fullName, |
||||
16 | public readonly string $insDate, |
||||
17 | public readonly string $cardNumber, |
||||
18 | public readonly string $currencyCode, |
||||
19 | public readonly string $customerTrns, |
||||
20 | public readonly string $merchantTrns, |
||||
21 | public readonly TransactionType $transactionTypeId, |
||||
22 | public readonly bool $recurringSupport, |
||||
23 | public readonly int $totalInstallments, |
||||
24 | public readonly ?string $cardCountryCode, |
||||
25 | public readonly ?string $cardIssuingBank, |
||||
26 | public readonly int $currentInstallment, |
||||
27 | public readonly string $cardUniqueReference, |
||||
28 | public readonly int $cardTypeId, |
||||
29 | public readonly ?int $digitalWalletId = null, |
||||
30 | ) { |
||||
31 | } |
||||
32 | |||||
33 | /** @phpstan-param TransactionArray $attributes */ |
||||
34 | 3 | public static function create(array $attributes): self |
|||
35 | { |
||||
36 | 3 | return new self(...[ |
|||
0 ignored issues
–
show
Bug
introduced
by
![]() The call to
Sebdesign\VivaPayments\R...nsaction::__construct() has too few arguments starting with amount .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. ![]() |
|||||
37 | ...$attributes, |
||||
38 | 3 | 'statusId' => TransactionStatus::from($attributes['statusId']), |
|||
39 | 3 | 'transactionTypeId' => TransactionType::from($attributes['transactionTypeId']), |
|||
40 | ]); |
||||
41 | } |
||||
42 | } |
||||
43 |