Skip to content

Commit

Permalink
fixed return type
Browse files Browse the repository at this point in the history
  • Loading branch information
mandan2 committed Dec 5, 2023
1 parent 4af473b commit 087f8bc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions subscription/DTO/SubscriptionCarrierProviderData.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@

class SubscriptionCarrierProviderData
{
/** @var int */
/** @var string */
private $mollieCustomerId;
/** @var int */
/** @var string */
private $mollieSubscriptionId;
/** @var int */
private $subscriptionCarrierId;
/** @var int */
private $orderId;

private function __construct(
int $mollieCustomerId,
int $mollieSubscriptionId,
string $mollieCustomerId,
string $mollieSubscriptionId,
int $subscriptionCarrierId,
int $orderId
) {
Expand All @@ -40,17 +40,17 @@ private function __construct(
}

/**
* @return int
* @return string
*/
public function getMollieCustomerId(): int
public function getMollieCustomerId(): string
{
return $this->mollieCustomerId;
}

/**
* @return int
* @return string
*/
public function getMollieSubscriptionId(): int
public function getMollieSubscriptionId(): string
{
return $this->mollieSubscriptionId;
}
Expand All @@ -72,8 +72,8 @@ public function getOrderId(): int
}

public static function create(
int $mollieCustomerId,
int $mollieSubscriptionId,
string $mollieCustomerId,
string $mollieSubscriptionId,
int $subscriptionCarrierId,
int $orderId
): self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ public function testItSuccessfullyProvidesData(): void
);

$result = $subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create(
1,
2,
'test-mollie-customer-id',
'test-mollie-subscription-id',
3,
4
));

$this->assertEquals(1, $result->getCustomerId());
$this->assertEquals(2, $result->getSubscriptionId());
$this->assertEquals('test-mollie-customer-id', $result->getCustomerId());
$this->assertEquals('test-mollie-subscription-id', $result->getSubscriptionId());
$this->assertEquals([
'metadata' => [
'secure_key' => SecureKeyUtility::generateReturnKey(
Expand Down Expand Up @@ -113,8 +113,8 @@ public function testItUnsuccessfullyProvidesDataFailedToFindOrder(): void
$this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_FIND_ORDER);

$subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create(
1,
2,
'test-mollie-customer-id',
'test-mollie-subscription-id',
3,
4
));
Expand Down Expand Up @@ -152,8 +152,8 @@ public function testItUnsuccessfullyProvidesDataFailedToFindSubscriptionProduct(
$this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_FIND_SUBSCRIPTION_PRODUCT);

$subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create(
1,
2,
'test-mollie-customer-id',
'test-mollie-subscription-id',
3,
4
));
Expand Down Expand Up @@ -191,8 +191,8 @@ public function testItUnsuccessfullyProvidesDataFailedToProvideSubscriptionOrder
$this->expectExceptionCode(ExceptionCode::ORDER_FAILED_TO_PROVIDE_SUBSCRIPTION_ORDER_AMOUNT);

$subscriptionCarrierProvider->get(SubscriptionCarrierProviderData::create(
1,
2,
'test-mollie-customer-id',
'test-mollie-subscription-id',
3,
4
));
Expand Down

0 comments on commit 087f8bc

Please sign in to comment.