Skip to content

Commit 79f51a8

Browse files
committed
docs: add PHPDoc types
1 parent ae0eb2f commit 79f51a8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

user_guide_src/source/tutorial/news_section.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ some additional tools to make working with data simpler. Add the
9898
following code to your model.
9999

100100
.. literalinclude:: news_section/002.php
101-
:lines: 11-18
101+
:lines: 11-23
102102

103103
With this code, you can perform two different queries. You can get all
104104
news records, or get a news item by its slug. You might have

user_guide_src/source/tutorial/news_section/002.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ class NewsModel extends Model
88
{
99
protected $table = 'news';
1010

11+
/**
12+
* @param false|string $slug
13+
*
14+
* @return array|null
15+
*/
1116
public function getNews($slug = false)
1217
{
1318
if ($slug === false) {

0 commit comments

Comments
 (0)