Skip to content

Commit a0ababf

Browse files
committed
docs: fix @return
Controller method can return string or void.
1 parent 7676ba2 commit a0ababf

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

system/RESTful/ResourceController.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ResourceController extends BaseResource
2424
/**
2525
* Return an array of resource objects, themselves in array format
2626
*
27-
* @return Response
27+
* @return Response|string|void
2828
*/
2929
public function index()
3030
{
@@ -36,7 +36,7 @@ public function index()
3636
*
3737
* @param string|null $id
3838
*
39-
* @return Response
39+
* @return Response|string|void
4040
*/
4141
public function show($id = null)
4242
{
@@ -46,7 +46,7 @@ public function show($id = null)
4646
/**
4747
* Return a new resource object, with default properties
4848
*
49-
* @return Response
49+
* @return Response|string|void
5050
*/
5151
public function new()
5252
{
@@ -56,7 +56,7 @@ public function new()
5656
/**
5757
* Create a new resource object, from "posted" parameters
5858
*
59-
* @return Response
59+
* @return Response|string|void
6060
*/
6161
public function create()
6262
{
@@ -68,7 +68,7 @@ public function create()
6868
*
6969
* @param string|null $id
7070
*
71-
* @return Response
71+
* @return Response|string|void
7272
*/
7373
public function edit($id = null)
7474
{
@@ -80,7 +80,7 @@ public function edit($id = null)
8080
*
8181
* @param string|null $id
8282
*
83-
* @return Response
83+
* @return Response|string|void
8484
*/
8585
public function update($id = null)
8686
{
@@ -92,7 +92,7 @@ public function update($id = null)
9292
*
9393
* @param string|null $id
9494
*
95-
* @return Response
95+
* @return Response|string|void
9696
*/
9797
public function delete($id = null)
9898
{

system/RESTful/ResourcePresenter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ResourcePresenter extends BaseResource
2121
/**
2222
* Present a view of resource objects
2323
*
24-
* @return Response|string
24+
* @return Response|string|void
2525
*/
2626
public function index()
2727
{
@@ -33,7 +33,7 @@ public function index()
3333
*
3434
* @param string|null $id
3535
*
36-
* @return Response|string
36+
* @return Response|string|void
3737
*/
3838
public function show($id = null)
3939
{
@@ -43,7 +43,7 @@ public function show($id = null)
4343
/**
4444
* Present a view to present a new single resource object
4545
*
46-
* @return Response|string
46+
* @return Response|string|void
4747
*/
4848
public function new()
4949
{
@@ -54,7 +54,7 @@ public function new()
5454
* Process the creation/insertion of a new resource object.
5555
* This should be a POST.
5656
*
57-
* @return Response|string
57+
* @return Response|string|void
5858
*/
5959
public function create()
6060
{
@@ -66,7 +66,7 @@ public function create()
6666
*
6767
* @param string|null $id
6868
*
69-
* @return Response|string
69+
* @return Response|string|void
7070
*/
7171
public function edit($id = null)
7272
{
@@ -79,7 +79,7 @@ public function edit($id = null)
7979
*
8080
* @param string|null $id
8181
*
82-
* @return Response|string
82+
* @return Response|string|void
8383
*/
8484
public function update($id = null)
8585
{
@@ -91,7 +91,7 @@ public function update($id = null)
9191
*
9292
* @param string|null $id
9393
*
94-
* @return Response|string
94+
* @return Response|string|void
9595
*/
9696
public function remove($id = null)
9797
{
@@ -103,7 +103,7 @@ public function remove($id = null)
103103
*
104104
* @param string|null $id
105105
*
106-
* @return Response|string
106+
* @return Response|string|void
107107
*/
108108
public function delete($id = null)
109109
{

0 commit comments

Comments
 (0)