From 71e70a56c51d6825bac1f45c2877728f7d4e7acb Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 17 Jan 2024 10:46:20 +0000 Subject: [PATCH] Adding return types --- web/modules/custom/example/src/Builder/PostBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/modules/custom/example/src/Builder/PostBuilder.php b/web/modules/custom/example/src/Builder/PostBuilder.php index addd814..0c51d34 100644 --- a/web/modules/custom/example/src/Builder/PostBuilder.php +++ b/web/modules/custom/example/src/Builder/PostBuilder.php @@ -16,13 +16,13 @@ final class PostBuilder { return new self(); } - public function setCreatedDate(string $time = 'now') { + public function setCreatedDate(string $time = 'now'): self { $this->created = new DrupalDateTime($time); return $this; } - public function setTitle(string $title) { + public function setTitle(string $title): self { $this->title = $title; return $this;