Skip to content

Commit 4b8a38d

Browse files
committed
fix: add type int for $id
Now if we add type int to controller params, it works. So we must allow type-casting on controller parameters in the future.
1 parent 5ae47a3 commit 4b8a38d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

system/Commands/Generators/Views/controller.tpl.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function index()
2121
/**
2222
* Return the properties of a resource object.
2323
*
24-
* @param string|null $id
24+
* @param int|string|null $id
2525
*
2626
* @return ResponseInterface
2727
*/
@@ -53,7 +53,7 @@ public function create()
5353
/**
5454
* Return the editable properties of a resource object.
5555
*
56-
* @param string|null $id
56+
* @param int|string|null $id
5757
*
5858
* @return ResponseInterface
5959
*/
@@ -65,7 +65,7 @@ public function edit($id = null)
6565
/**
6666
* Add or update a model resource, from "posted" properties.
6767
*
68-
* @param string|null $id
68+
* @param int|string|null $id
6969
*
7070
* @return ResponseInterface
7171
*/
@@ -77,7 +77,7 @@ public function update($id = null)
7777
/**
7878
* Delete the designated resource object from the model.
7979
*
80-
* @param string|null $id
80+
* @param int|string|null $id
8181
*
8282
* @return ResponseInterface
8383
*/
@@ -99,7 +99,7 @@ public function index()
9999
/**
100100
* Present a view to present a specific resource object.
101101
*
102-
* @param string|null $id
102+
* @param int|string|null $id
103103
*
104104
* @return ResponseInterface
105105
*/
@@ -132,7 +132,7 @@ public function create()
132132
/**
133133
* Present a view to edit the properties of a specific resource object.
134134
*
135-
* @param string|null $id
135+
* @param int|string|null $id
136136
*
137137
* @return ResponseInterface
138138
*/
@@ -145,7 +145,7 @@ public function edit($id = null)
145145
* Process the updating, full or partial, of a specific resource object.
146146
* This should be a POST.
147147
*
148-
* @param string|null $id
148+
* @param int|string|null $id
149149
*
150150
* @return ResponseInterface
151151
*/
@@ -157,7 +157,7 @@ public function update($id = null)
157157
/**
158158
* Present a view to confirm the deletion of a specific resource object.
159159
*
160-
* @param string|null $id
160+
* @param int|string|null $id
161161
*
162162
* @return ResponseInterface
163163
*/
@@ -169,7 +169,7 @@ public function remove($id = null)
169169
/**
170170
* Process the deletion of a specific resource object.
171171
*
172-
* @param string|null $id
172+
* @param int|string|null $id
173173
*
174174
* @return ResponseInterface
175175
*/

0 commit comments

Comments
 (0)