Permalink
Browse files

支援 fluent setter

  • Loading branch information...
1 parent d4da626 commit d27d4e15a740666c9ad0f1be71048c91970da567 Sam.IO.Hsiao committed Jul 28, 2016
Showing with 3 additions and 9 deletions.
  1. +3 −9 app/Services/PostService.php
@@ -34,18 +34,12 @@ public function showTitle(int $id, string $default) : string
}
/**
- * @return int
- */
- public function getPostId(): int
- {
- return $this->postId;
- }
-
- /**
* @param int $postId
+ * @return PostService
*/
- public function setPostId(int $postId)
+ public function setPostId(int $postId): PostService
{
$this->postId = $postId;
+ return $this;
}
}

0 comments on commit d27d4e1

Please sign in to comment.