From 7a04c51aa25f492369880ab5adca7147cf09a48b Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 1 Nov 2023 09:03:08 +0900 Subject: [PATCH] docs: add return types in sample code --- user_guide_src/source/outgoing/view_cells/014.php | 2 +- user_guide_src/source/outgoing/view_cells/016.php | 2 +- user_guide_src/source/outgoing/view_cells/018.php | 2 +- user_guide_src/source/outgoing/view_cells/019.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide_src/source/outgoing/view_cells/014.php b/user_guide_src/source/outgoing/view_cells/014.php index 29378e1199ab..7aa1ad4c9d8c 100644 --- a/user_guide_src/source/outgoing/view_cells/014.php +++ b/user_guide_src/source/outgoing/view_cells/014.php @@ -12,7 +12,7 @@ class AlertMessageCell extends Cell protected $message; private $computed; - public function mount() + public function mount(): void { $this->computed = sprintf('%s - %s', $this->type, $this->message); } diff --git a/user_guide_src/source/outgoing/view_cells/016.php b/user_guide_src/source/outgoing/view_cells/016.php index 4b2c10ef0cc6..54d9d7d994a4 100644 --- a/user_guide_src/source/outgoing/view_cells/016.php +++ b/user_guide_src/source/outgoing/view_cells/016.php @@ -10,7 +10,7 @@ class RecentPostsCell extends Cell { protected $posts; - public function linkPost($post) + public function linkPost($post): string { return anchor('posts/' . $post->id, $post->title); } diff --git a/user_guide_src/source/outgoing/view_cells/018.php b/user_guide_src/source/outgoing/view_cells/018.php index 3f64e68464e9..8767af1b40a2 100644 --- a/user_guide_src/source/outgoing/view_cells/018.php +++ b/user_guide_src/source/outgoing/view_cells/018.php @@ -8,7 +8,7 @@ class RecentPostsCell extends Cell { protected $posts; - public function mount() + public function mount(): void { $this->posts = model('PostModel')->orderBy('created_at', 'DESC')->findAll(10); } diff --git a/user_guide_src/source/outgoing/view_cells/019.php b/user_guide_src/source/outgoing/view_cells/019.php index df78ab0acec5..db1b12b56b54 100644 --- a/user_guide_src/source/outgoing/view_cells/019.php +++ b/user_guide_src/source/outgoing/view_cells/019.php @@ -10,7 +10,7 @@ class RecentPostsCell extends Cell { protected $posts; - public function mount(?int $categoryId) + public function mount(?int $categoryId): void { $this->posts = model('PostModel') ->when(