add types
This commit is contained in:
@@ -29,13 +29,16 @@ class OnlinePaymentRepo
|
||||
*/
|
||||
public function getPrice(int|float|string $price): string
|
||||
{
|
||||
return number_format($price, 2, '', '');
|
||||
return number_format(floatval($price), 2, '', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Pay card order
|
||||
*
|
||||
* @param mixed $resource
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function payCardOrder($resource): array
|
||||
public function payCardOrder(mixed $resource): array
|
||||
{
|
||||
$orderNumber = $this->generateOrderNumber($resource);
|
||||
|
||||
@@ -89,7 +92,7 @@ class OnlinePaymentRepo
|
||||
/**
|
||||
* Generate order number for payment
|
||||
*/
|
||||
public function generateOrderNumber($resource): int
|
||||
public function generateOrderNumber(mixed $resource): int
|
||||
{
|
||||
return ApiKeyHalkbank::generateOrderNumber($resource);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user