Skip to content

Commit

Permalink
The Order::getNumber() return type is no longer nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Mar 30, 2024
1 parent 410dc8b commit 41fe395
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
- `getPayableRemoteId()`
- `setPayableRemoteId()`
- `findByPayableRemoteId()`
- BC: The return type of the `getNumber()` method of the Order interface is no longer nullable
- BC: The `Channel` interface extends the `Configurable` interface
- BC: Added the following methods to the `Channel` interface:
- `getLanguage()`
Expand Down
1 change: 1 addition & 0 deletions src/Order/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Upgraded to Konekt Address and User modules to v3
- Added the `currency` field to the orders table
- Added Carbon 3 compatibility
- BC: The return type of the `getNumber()` method of the Order interface is no longer nullable
- BC: Added the `$hooks` and `$itemHooks` parameters to the `OrderFactory` interface
- BC: Changed the `OrderItem` interface into Configurable
- BC: Added 7 methods to the `OrderItem` interface
Expand Down
2 changes: 1 addition & 1 deletion src/Order/Contracts/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

interface Order
{
public function getNumber(): ?string;
public function getNumber(): string;

public function getStatus(): OrderStatus;

Expand Down
4 changes: 2 additions & 2 deletions src/Order/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public static function findByNumber(string $orderNumber): ?OrderContract
return static::where('number', $orderNumber)->first();
}

public function getNumber(): ?string
public function getNumber(): string
{
return $this->number;
return (string) $this->number;
}

public function getStatus(): OrderStatus
Expand Down

0 comments on commit 41fe395

Please sign in to comment.