@@ -34,7 +34,7 @@ public function __construct(SchemaTypeNormalizer $schemaTypeNormalizer)
3434 *
3535 * @throws \ReflectionException
3636 */
37- public function normalize (TypeDoc $ doc )
37+ public function normalize (TypeDoc $ doc ) : array
3838 {
3939 $ siblingsDoc = $ paramDocRequired = [];
4040
@@ -47,24 +47,24 @@ public function normalize(TypeDoc $doc)
4747 $ format = ($ doc instanceof StringDoc ? $ doc ->getFormat () : null );
4848
4949 return $ this ->appendIfValueNotNull ('description ' , $ doc ->getDescription ())
50- + ['type ' => $ this ->schemaTypeNormalizer ->normalize ($ doc )]
51- + $ this ->appendIfValueNotNull ('format ' , $ format )
52- + ['nullable ' => $ doc ->isNullable ()]
53- + $ paramDocRequired
54- + $ this ->appendIfValueNotNull ('default ' , $ doc ->getDefault ())
55- + $ this ->appendIfValueNotNull ('example ' , $ doc ->getExample ())
56- + $ this ->appendIfValueHaveSiblings ('enum ' , array_values ($ doc ->getAllowedValueList ()))
57- + $ this ->getMinMaxDoc ($ doc )
58- + $ siblingsDoc
59- ;
50+ + ['type ' => $ this ->schemaTypeNormalizer ->normalize ($ doc )]
51+ + $ this ->appendIfValueNotNull ('format ' , $ format )
52+ + ['nullable ' => $ doc ->isNullable ()]
53+ + $ paramDocRequired
54+ + $ this ->appendIfValueNotNull ('default ' , $ doc ->getDefault ())
55+ + $ this ->appendIfValueNotNull ('example ' , $ doc ->getExample ())
56+ + $ this ->appendIfValueHaveSiblings ('enum ' , array_values ($ doc ->getAllowedValueList ()))
57+ + $ this ->getMinMaxDoc ($ doc )
58+ + $ siblingsDoc
59+ ;
6060 }
6161
6262 /**
6363 * @param TypeDoc $doc
6464 *
6565 * @return array
6666 */
67- protected function getMinMaxDoc (TypeDoc $ doc )
67+ protected function getMinMaxDoc (TypeDoc $ doc ) : array
6868 {
6969 $ paramDocMinMax = [];
7070 if ($ doc instanceof StringDoc) {
@@ -93,7 +93,7 @@ protected function getMinMaxDoc(TypeDoc $doc)
9393 *
9494 * @throws \ReflectionException
9595 */
96- protected function appendArrayDoc (TypeDoc $ doc , array $ siblingsDoc )
96+ protected function appendArrayDoc (TypeDoc $ doc , array $ siblingsDoc ) : array
9797 {
9898 // CollectionDoc should be managed as ArrayDoc
9999 if (!$ doc instanceof ArrayDoc && get_class ($ doc ) !== CollectionDoc::class) {
@@ -117,7 +117,7 @@ protected function appendArrayDoc(TypeDoc $doc, array $siblingsDoc)
117117 *
118118 * @return array
119119 */
120- protected function appendObjectDoc (TypeDoc $ doc , array $ siblingsDoc , array $ paramDocRequired )
120+ protected function appendObjectDoc (TypeDoc $ doc , array $ siblingsDoc , array $ paramDocRequired ) : array
121121 {
122122 if (!$ doc instanceof ObjectDoc) {
123123 return [$ siblingsDoc , $ paramDocRequired ];
@@ -162,7 +162,7 @@ function (array $carry, TypeDoc $sibling) {
162162 *
163163 * @return string
164164 */
165- protected function guessItemsType (array $ siblingList )
165+ protected function guessItemsType (array $ siblingList ) : string
166166 {
167167 $ self = $ this ;
168168 $ uniqueTypeList = array_unique (
@@ -188,7 +188,7 @@ function (TypeDoc $sibling) use ($self) {
188188 *
189189 * @return array
190190 */
191- protected function appendNumberMinMax (NumberDoc $ doc , array $ paramDocMinMax )
191+ protected function appendNumberMinMax (NumberDoc $ doc , array $ paramDocMinMax ) : array
192192 {
193193 $ paramDocMinMax = $ this ->appendIfValueNotNull ('minimum ' , $ doc ->getMin (), $ paramDocMinMax );
194194 $ paramDocMinMax = $ this ->appendIf (
0 commit comments