@@ -47,14 +47,14 @@ class Endpoint implements JsonSerializable
4747 /**
4848 * Endpoint constructor.
4949 *
50- * @param string $httpMethod
51- * @param string $summary
52- * @param string $description
53- * @param Response[] $responses
50+ * @param string $httpMethod
51+ * @param string $summary
52+ * @param string $description
53+ * @param Response[] $responses
5454 * @param Parameter[]|null $parameters
5555 */
5656 private function __construct (string $ httpMethod , string $ summary , string $ description , array $ responses ,
57- ?array $ parameters = null
57+ ?array $ parameters = null
5858 )
5959 {
6060
@@ -198,38 +198,27 @@ public function withRequestBodyFromEntity(string $class, string $contentType = s
198198
199199 }
200200
201- /**
202- * @return string
203- */
204201 final public function getHttpMethod (): string
205202 {
206203
207204 return $ this ->httpMethod ;
208205 }
209206
210207 /**
211- * @return array| Response[]
208+ * @return Response[]
212209 */
213- final public function getResponses ()
210+ final public function getResponses (): array
214211 {
215212
216213 return $ this ->responses ;
217214 }
218215
219- /**
220- * Specify data which should be serialized to JSON
221- *
222- * @link https://php.net/manual/en/jsonserializable.jsonserialize.php
223- * @return mixed data which can be serialized by <b>json_encode</b>,
224- * which is a value of any type other than a resource.
225- * @since 5.4.0
226- */
227- public function jsonSerialize ()
216+ public function jsonSerialize (): array
228217 {
229218
230219 $ return = [
231- 'tags ' => [$ this ->tag ],
232- 'summary ' => $ this ->summary ,
220+ 'tags ' => [$ this ->tag ],
221+ 'summary ' => $ this ->summary ,
233222 'operationId ' => strtolower (
234223 str_replace (
235224 ' ' ,
@@ -356,7 +345,7 @@ public function jsonSerialize()
356345
357346 $ return ['requestBody ' ] = [
358347 'required ' => true ,
359- 'content ' => []
348+ 'content ' => []
360349 ];
361350
362351 $ contentTypes = [];
0 commit comments