@@ -159,6 +159,9 @@ |
||
159 | 159 | ), parent::toArray())); |
160 | 160 | } |
161 | 161 | |
162 | + /** |
|
163 | + * @param string|null $items |
|
164 | + */ |
|
162 | 165 | private function validateItems($items) |
163 | 166 | { |
164 | 167 | if (empty($items)) { |
@@ -140,6 +140,9 @@ |
||
140 | 140 | return __CLASS__; |
141 | 141 | } |
142 | 142 | |
143 | + /** |
|
144 | + * @param string|null $value |
|
145 | + */ |
|
143 | 146 | private function validateDefault($value) |
144 | 147 | { |
145 | 148 | if (preg_match('~^-?\d+$~', $value) !== 1) { |
@@ -131,6 +131,9 @@ |
||
131 | 131 | return __CLASS__; |
132 | 132 | } |
133 | 133 | |
134 | + /** |
|
135 | + * @param string|null $value |
|
136 | + */ |
|
134 | 137 | private function validateDefault($value) |
135 | 138 | { |
136 | 139 | if (preg_match('~^-?(?:\\d*\\.?\\d+|\\d+\\.\\d*)$~', $value) !== 1) { |
@@ -16,10 +16,10 @@ |
||
16 | 16 | public function Dummy() |
17 | 17 | { |
18 | 18 | /** |
19 | - * @rest\endpoint /v1/users/{id} |
|
20 | - * @rest\method GET Return a JSON with all the user attributes |
|
21 | - * @rest\path Int id The ID of the User |
|
22 | - * @rest\response 200 User |
|
19 | + * @rest\endpoint /v1/users/{id} |
|
20 | + * @rest\method GET Return a JSON with all the user attributes |
|
21 | + * @rest\path Int id The ID of the User |
|
22 | + * @rest\response 200 User |
|
23 | 23 | */ |
24 | 24 | $app->get('/v1/users/{id:[0-9]+}', function ($request, $response, $args) { |
25 | 25 | // ... |