Skip to content

Commit

Permalink
DOC Update typehints in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Aug 22, 2024
1 parent 9f9712d commit 117dee5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion en/02_Developer_Guides/01_Templates/01_Syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ use Page;

class HomePage extends Page
{
public function forTemplate()
public function forTemplate(): string
{
// We can also render a template here using $this->renderWith()
return 'Page: ' . $this->Title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class Product extends DataObject implements CMSPreviewable
{
// ...

public function forTemplate()
public function forTemplate(): string
{
// If the template for this DataObject is not an "Include" template, use the appropriate type here
// e.g. "Layout".
Expand Down

0 comments on commit 117dee5

Please sign in to comment.