Skip to content

Commit 7a04c51

Browse files
committed
docs: add return types in sample code
1 parent c99c118 commit 7a04c51

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

user_guide_src/source/outgoing/view_cells/014.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class AlertMessageCell extends Cell
1212
protected $message;
1313
private $computed;
1414

15-
public function mount()
15+
public function mount(): void
1616
{
1717
$this->computed = sprintf('%s - %s', $this->type, $this->message);
1818
}

user_guide_src/source/outgoing/view_cells/016.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class RecentPostsCell extends Cell
1010
{
1111
protected $posts;
1212

13-
public function linkPost($post)
13+
public function linkPost($post): string
1414
{
1515
return anchor('posts/' . $post->id, $post->title);
1616
}

user_guide_src/source/outgoing/view_cells/018.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class RecentPostsCell extends Cell
88
{
99
protected $posts;
1010

11-
public function mount()
11+
public function mount(): void
1212
{
1313
$this->posts = model('PostModel')->orderBy('created_at', 'DESC')->findAll(10);
1414
}

user_guide_src/source/outgoing/view_cells/019.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class RecentPostsCell extends Cell
1010
{
1111
protected $posts;
1212

13-
public function mount(?int $categoryId)
13+
public function mount(?int $categoryId): void
1414
{
1515
$this->posts = model('PostModel')
1616
->when(

0 commit comments

Comments
 (0)