Skip to content

Commit

Permalink
feat: Update BaseDTO to implement Arrayable interface (#628)
Browse files Browse the repository at this point in the history
Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia committed May 17, 2024
1 parent 963612c commit ca59050
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Contract/BaseDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
namespace FriendsOfHyperf\ValidatedDTO\Contract;

use Hyperf\Command\Command;
use Hyperf\Contract\Arrayable;
use Hyperf\Database\Model\Model;
use Psr\Http\Message\RequestInterface;

interface BaseDTO
interface BaseDTO extends Arrayable
{
public static function fromJson(string $json): static;

Expand All @@ -31,8 +32,6 @@ public static function fromCommandOptions(Command $command): static;

public static function fromCommand(Command $command): static;

public function toArray(): array;

public function toJson(): string;

public function toPrettyJson(): string;
Expand Down

0 comments on commit ca59050

Please sign in to comment.