sebdesign /
laravel-viva-payments
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Sebdesign\VivaPayments\Responses; |
||||
| 4 | |||||
| 5 | use Sebdesign\VivaPayments\Enums\TransactionStatus; |
||||
| 6 | |||||
| 7 | class RecurringTransaction |
||||
| 8 | { |
||||
| 9 | 1 | public function __construct( |
|||
| 10 | public readonly ?string $Emv, |
||||
| 11 | public readonly float $Amount, |
||||
| 12 | public readonly TransactionStatus $StatusId, |
||||
| 13 | public readonly ?string $RedirectUrl, |
||||
| 14 | public readonly string $CurrencyCode, |
||||
| 15 | public readonly string $TransactionId, |
||||
| 16 | public readonly int $ReferenceNumber, |
||||
| 17 | public readonly string $AuthorizationId, |
||||
| 18 | public readonly string $RetrievalReferenceNumber, |
||||
| 19 | public readonly ?string $Loyalty, |
||||
| 20 | public readonly int $ThreeDSecureStatusId, |
||||
| 21 | public readonly int $ErrorCode, |
||||
| 22 | public readonly ?string $ErrorText, |
||||
| 23 | public readonly string $TimeStamp, |
||||
| 24 | public readonly ?string $CorrelationId, |
||||
| 25 | public readonly int $EventId, |
||||
| 26 | public readonly bool $Success, |
||||
| 27 | ) { |
||||
| 28 | } |
||||
| 29 | |||||
| 30 | /** @phpstan-param RecurringTransactionArray $attributes */ |
||||
| 31 | 3 | public static function create(array $attributes): self |
|||
| 32 | { |
||||
| 33 | 3 | return new self(...[ |
|||
|
0 ignored issues
–
show
array($attributes, 'Stat...ttributes['StatusId'])) of type Sebdesign\VivaPayments\E...TransactionStatus|array is incompatible with the type null|string expected by parameter $Emv of Sebdesign\VivaPayments\R...nsaction::__construct().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 34 | ...$attributes, |
||||
| 35 | 3 | 'StatusId' => TransactionStatus::from($attributes['StatusId']), |
|||
| 36 | ]); |
||||
| 37 | } |
||||
| 38 | } |
||||
| 39 |
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.