From a9779944601bcbc01a9c5c42d61372e501e056a0 Mon Sep 17 00:00:00 2001 From: Mikel Madariaga Date: Thu, 30 Nov 2023 21:01:34 +0100 Subject: [PATCH] [BC] changed createDto method signature so that we can fix some hint issues --- Domain/Model/Changelog/ChangelogAbstract.php | 5 ++++- Domain/Model/Changelog/ChangelogInterface.php | 5 ++++- Domain/Model/ChangelogTrait.php | 6 +++++- Domain/Model/Commandlog/CommandlogAbstract.php | 5 ++++- Domain/Model/Commandlog/CommandlogInterface.php | 5 ++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Domain/Model/Changelog/ChangelogAbstract.php b/Domain/Model/Changelog/ChangelogAbstract.php index bb18d31..8106260 100644 --- a/Domain/Model/Changelog/ChangelogAbstract.php +++ b/Domain/Model/Changelog/ChangelogAbstract.php @@ -84,7 +84,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): ChangelogDto + /** + * @param string|null $id + */ + public static function createDto($id = null): ChangelogDto { return new ChangelogDto($id); } diff --git a/Domain/Model/Changelog/ChangelogInterface.php b/Domain/Model/Changelog/ChangelogInterface.php index a72357a..eb6751c 100644 --- a/Domain/Model/Changelog/ChangelogInterface.php +++ b/Domain/Model/Changelog/ChangelogInterface.php @@ -32,7 +32,10 @@ public function replaceData($data = null); */ public function getId(): ?string; - public static function createDto(string|int|null $id = null): ChangelogDto; + /** + * @param string|null $id + */ + public static function createDto($id = null): ChangelogDto; /** * @internal use EntityTools instead diff --git a/Domain/Model/ChangelogTrait.php b/Domain/Model/ChangelogTrait.php index 0d7d21c..02a4992 100644 --- a/Domain/Model/ChangelogTrait.php +++ b/Domain/Model/ChangelogTrait.php @@ -24,7 +24,11 @@ trait ChangelogTrait abstract public function getId(); abstract protected function __toArray(); - abstract public static function createDto(string|int $id = null): DataTransferObjectInterface; + + /** + * @param string|int|null $id + */ + abstract public static function createDto($id = null): DataTransferObjectInterface; /** * TRUE on new entities until transaction is closed diff --git a/Domain/Model/Commandlog/CommandlogAbstract.php b/Domain/Model/Commandlog/CommandlogAbstract.php index 6772adb..fa8b49e 100644 --- a/Domain/Model/Commandlog/CommandlogAbstract.php +++ b/Domain/Model/Commandlog/CommandlogAbstract.php @@ -87,7 +87,10 @@ protected function sanitizeValues(): void { } - public static function createDto(string|int|null $id = null): CommandlogDto + /** + * @param string|null $id + */ + public static function createDto($id = null): CommandlogDto { return new CommandlogDto($id); } diff --git a/Domain/Model/Commandlog/CommandlogInterface.php b/Domain/Model/Commandlog/CommandlogInterface.php index 0ca7482..33f8d0a 100644 --- a/Domain/Model/Commandlog/CommandlogInterface.php +++ b/Domain/Model/Commandlog/CommandlogInterface.php @@ -25,7 +25,10 @@ public function getId(): ?string; */ public static function fromEvent(CommandEventInterface $event); - public static function createDto(string|int|null $id = null): CommandlogDto; + /** + * @param string|null $id + */ + public static function createDto($id = null): CommandlogDto; /** * @internal use EntityTools instead