Skip to content

Commit d6cd7b1

Browse files
committed
docs: add int to @param $id
There is no way to pass int value to the controller method now, unless extending Router. But $id may be essentially int, and we should support int.
1 parent a0ababf commit d6cd7b1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

system/RESTful/ResourceController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function index()
3434
/**
3535
* Return the properties of a resource object
3636
*
37-
* @param string|null $id
37+
* @param int|string|null $id
3838
*
3939
* @return Response|string|void
4040
*/
@@ -66,7 +66,7 @@ public function create()
6666
/**
6767
* Return the editable properties of a resource object
6868
*
69-
* @param string|null $id
69+
* @param int|string|null $id
7070
*
7171
* @return Response|string|void
7272
*/
@@ -78,7 +78,7 @@ public function edit($id = null)
7878
/**
7979
* Add or update a model resource, from "posted" properties
8080
*
81-
* @param string|null $id
81+
* @param string|null|int$id
8282
*
8383
* @return Response|string|void
8484
*/
@@ -90,7 +90,7 @@ public function update($id = null)
9090
/**
9191
* Delete the designated resource object from the model
9292
*
93-
* @param string|null $id
93+
* @param int|string|null $id
9494
*
9595
* @return Response|string|void
9696
*/

system/RESTful/ResourcePresenter.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function index()
3131
/**
3232
* Present a view to present a specific resource object
3333
*
34-
* @param string|null $id
34+
* @param int|string|null $id
3535
*
3636
* @return Response|string|void
3737
*/
@@ -64,7 +64,7 @@ public function create()
6464
/**
6565
* Present a view to edit the properties of a specific resource object
6666
*
67-
* @param string|null $id
67+
* @param int|string|null $id
6868
*
6969
* @return Response|string|void
7070
*/
@@ -77,7 +77,7 @@ public function edit($id = null)
7777
* Process the updating, full or partial, of a specific resource object.
7878
* This should be a POST.
7979
*
80-
* @param string|null $id
80+
* @param int|string|null $id
8181
*
8282
* @return Response|string|void
8383
*/
@@ -89,7 +89,7 @@ public function update($id = null)
8989
/**
9090
* Present a view to confirm the deletion of a specific resource object
9191
*
92-
* @param string|null $id
92+
* @param int|string|null $id
9393
*
9494
* @return Response|string|void
9595
*/
@@ -101,7 +101,7 @@ public function remove($id = null)
101101
/**
102102
* Process the deletion of a specific resource object
103103
*
104-
* @param string|null $id
104+
* @param int|string|null $id
105105
*
106106
* @return Response|string|void
107107
*/

0 commit comments

Comments
 (0)