Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Payment/Application/DTO/CreateTransactionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
final readonly class CreateTransactionRequest
{
/**
* @param array<CartItem> $cart
* @param array<CartItem>|null $cart
*/
public function __construct(
public string $amount,
Expand Down
4 changes: 2 additions & 2 deletions src/Payment/Domain/ValueObject/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct(
public ?string $firstName = null,
public ?string $lastName = null,
public ?string $street = null,
public ?string $building = null,
public ?string $buildingNumber = null,
public ?string $flat = null,
public ?string $city = null,
public ?string $region = null,
Expand All @@ -37,7 +37,7 @@ public function toArray(): array
'firstName' => $this->firstName,
'lastName' => $this->lastName,
'street' => $this->street,
'building' => $this->building,
'buildingNumber' => $this->buildingNumber,
'flat' => $this->flat,
'city' => $this->city,
'region' => $this->region,
Expand Down
10 changes: 5 additions & 5 deletions tests/Unit/Domain/ValueObject/AddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function createsWithAllFields(): void
firstName: 'Jan',
lastName: 'Kowalski',
street: 'Główna',
building: '10',
buildingNumber: '10',
flat: '5A',
city: 'Warszawa',
region: 'Mazowieckie',
Expand All @@ -33,7 +33,7 @@ public function createsWithAllFields(): void
$this->assertSame('Jan', $address->firstName);
$this->assertSame('Kowalski', $address->lastName);
$this->assertSame('Główna', $address->street);
$this->assertSame('10', $address->building);
$this->assertSame('10', $address->buildingNumber);
$this->assertSame('5A', $address->flat);
$this->assertSame('Warszawa', $address->city);
$this->assertSame('Mazowieckie', $address->region);
Expand All @@ -53,7 +53,7 @@ public function createsWithNoFields(): void
$this->assertNull($address->firstName);
$this->assertNull($address->lastName);
$this->assertNull($address->street);
$this->assertNull($address->building);
$this->assertNull($address->buildingNumber);
$this->assertNull($address->flat);
$this->assertNull($address->city);
$this->assertNull($address->region);
Expand All @@ -72,7 +72,7 @@ public function convertsToArrayWithAllFields(): void
firstName: 'Anna',
lastName: 'Nowak',
street: 'Kwiatowa',
building: '5',
buildingNumber: '5',
city: 'Kraków',
postalCode: '30-001',
country: 'PL',
Expand All @@ -83,7 +83,7 @@ public function convertsToArrayWithAllFields(): void
$this->assertSame('Anna', $array['firstName']);
$this->assertSame('Nowak', $array['lastName']);
$this->assertSame('Kwiatowa', $array['street']);
$this->assertSame('5', $array['building']);
$this->assertSame('5', $array['buildingNumber']);
$this->assertSame('Kraków', $array['city']);
$this->assertSame('30-001', $array['postalCode']);
$this->assertSame('PL', $array['country']);
Expand Down