Skip to content

Commit 3c5a22e

Browse files
authored
Merge pull request #8561 from kenjis/fix-types-in-controller.tpl.php
fix: PHPDoc types in controller.tpl.php
2 parents 65c6a61 + 4b8a38d commit 3c5a22e

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

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

+32-24
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class {class} extends {extends}
99
{
1010
<?php if ($type === 'controller'): ?>
1111
/**
12-
* Return an array of resource objects, themselves in array format
12+
* Return an array of resource objects, themselves in array format.
1313
*
1414
* @return ResponseInterface
1515
*/
@@ -19,7 +19,9 @@ public function index()
1919
}
2020

2121
/**
22-
* Return the properties of a resource object
22+
* Return the properties of a resource object.
23+
*
24+
* @param int|string|null $id
2325
*
2426
* @return ResponseInterface
2527
*/
@@ -29,7 +31,7 @@ public function show($id = null)
2931
}
3032

3133
/**
32-
* Return a new resource object, with default properties
34+
* Return a new resource object, with default properties.
3335
*
3436
* @return ResponseInterface
3537
*/
@@ -39,7 +41,7 @@ public function new()
3941
}
4042

4143
/**
42-
* Create a new resource object, from "posted" parameters
44+
* Create a new resource object, from "posted" parameters.
4345
*
4446
* @return ResponseInterface
4547
*/
@@ -49,7 +51,9 @@ public function create()
4951
}
5052

5153
/**
52-
* Return the editable properties of a resource object
54+
* Return the editable properties of a resource object.
55+
*
56+
* @param int|string|null $id
5357
*
5458
* @return ResponseInterface
5559
*/
@@ -59,7 +63,9 @@ public function edit($id = null)
5963
}
6064

6165
/**
62-
* Add or update a model resource, from "posted" properties
66+
* Add or update a model resource, from "posted" properties.
67+
*
68+
* @param int|string|null $id
6369
*
6470
* @return ResponseInterface
6571
*/
@@ -69,7 +75,9 @@ public function update($id = null)
6975
}
7076

7177
/**
72-
* Delete the designated resource object from the model
78+
* Delete the designated resource object from the model.
79+
*
80+
* @param int|string|null $id
7381
*
7482
* @return ResponseInterface
7583
*/
@@ -79,7 +87,7 @@ public function delete($id = null)
7987
}
8088
<?php elseif ($type === 'presenter'): ?>
8189
/**
82-
* Present a view of resource objects
90+
* Present a view of resource objects.
8391
*
8492
* @return ResponseInterface
8593
*/
@@ -89,9 +97,9 @@ public function index()
8997
}
9098

9199
/**
92-
* Present a view to present a specific resource object
100+
* Present a view to present a specific resource object.
93101
*
94-
* @param string $id
102+
* @param int|string|null $id
95103
*
96104
* @return ResponseInterface
97105
*/
@@ -101,9 +109,9 @@ public function show($id = null)
101109
}
102110

103111
/**
104-
* Present a view to present a new single resource object
112+
* Present a view to present a new single resource object.
105113
*
106-
* @return mixed
114+
* @return ResponseInterface
107115
*/
108116
public function new()
109117
{
@@ -114,19 +122,19 @@ public function new()
114122
* Process the creation/insertion of a new resource object.
115123
* This should be a POST.
116124
*
117-
* @return mixed
125+
* @return ResponseInterface
118126
*/
119127
public function create()
120128
{
121129
//
122130
}
123131

124132
/**
125-
* Present a view to edit the properties of a specific resource object
133+
* Present a view to edit the properties of a specific resource object.
126134
*
127-
* @param mixed $id
135+
* @param int|string|null $id
128136
*
129-
* @return mixed
137+
* @return ResponseInterface
130138
*/
131139
public function edit($id = null)
132140
{
@@ -137,33 +145,33 @@ public function edit($id = null)
137145
* Process the updating, full or partial, of a specific resource object.
138146
* This should be a POST.
139147
*
140-
* @param mixed $id
148+
* @param int|string|null $id
141149
*
142-
* @return mixed
150+
* @return ResponseInterface
143151
*/
144152
public function update($id = null)
145153
{
146154
//
147155
}
148156

149157
/**
150-
* Present a view to confirm the deletion of a specific resource object
158+
* Present a view to confirm the deletion of a specific resource object.
151159
*
152-
* @param mixed $id
160+
* @param int|string|null $id
153161
*
154-
* @return mixed
162+
* @return ResponseInterface
155163
*/
156164
public function remove($id = null)
157165
{
158166
//
159167
}
160168

161169
/**
162-
* Process the deletion of a specific resource object
170+
* Process the deletion of a specific resource object.
163171
*
164-
* @param mixed $id
172+
* @param int|string|null $id
165173
*
166-
* @return mixed
174+
* @return ResponseInterface
167175
*/
168176
public function delete($id = null)
169177
{

0 commit comments

Comments
 (0)