@@ -152,27 +152,57 @@ public function toArray(): array
152152 }
153153
154154 // String
155- if ($ this ->minLength !== null ) $ schema ['minLength ' ] = $ this ->minLength ;
156- if ($ this ->maxLength !== null ) $ schema ['maxLength ' ] = $ this ->maxLength ;
157- if ($ this ->pattern !== null ) $ schema ['pattern ' ] = $ this ->pattern ;
155+ if ($ this ->minLength !== null ) {
156+ $ schema ['minLength ' ] = $ this ->minLength ;
157+ }
158+ if ($ this ->maxLength !== null ) {
159+ $ schema ['maxLength ' ] = $ this ->maxLength ;
160+ }
161+ if ($ this ->pattern !== null ) {
162+ $ schema ['pattern ' ] = $ this ->pattern ;
163+ }
158164
159165 // Numeric
160- if ($ this ->minimum !== null ) $ schema ['minimum ' ] = $ this ->minimum ;
161- if ($ this ->maximum !== null ) $ schema ['maximum ' ] = $ this ->maximum ;
162- if ($ this ->exclusiveMinimum !== null ) $ schema ['exclusiveMinimum ' ] = $ this ->exclusiveMinimum ;
163- if ($ this ->exclusiveMaximum !== null ) $ schema ['exclusiveMaximum ' ] = $ this ->exclusiveMaximum ;
164- if ($ this ->multipleOf !== null ) $ schema ['multipleOf ' ] = $ this ->multipleOf ;
166+ if ($ this ->minimum !== null ) {
167+ $ schema ['minimum ' ] = $ this ->minimum ;
168+ }
169+ if ($ this ->maximum !== null ) {
170+ $ schema ['maximum ' ] = $ this ->maximum ;
171+ }
172+ if ($ this ->exclusiveMinimum !== null ) {
173+ $ schema ['exclusiveMinimum ' ] = $ this ->exclusiveMinimum ;
174+ }
175+ if ($ this ->exclusiveMaximum !== null ) {
176+ $ schema ['exclusiveMaximum ' ] = $ this ->exclusiveMaximum ;
177+ }
178+ if ($ this ->multipleOf !== null ) {
179+ $ schema ['multipleOf ' ] = $ this ->multipleOf ;
180+ }
165181
166182 // Array
167- if ($ this ->items !== null ) $ schema ['items ' ] = $ this ->items ;
168- if ($ this ->minItems !== null ) $ schema ['minItems ' ] = $ this ->minItems ;
169- if ($ this ->maxItems !== null ) $ schema ['maxItems ' ] = $ this ->maxItems ;
170- if ($ this ->uniqueItems !== null ) $ schema ['uniqueItems ' ] = $ this ->uniqueItems ;
183+ if ($ this ->items !== null ) {
184+ $ schema ['items ' ] = $ this ->items ;
185+ }
186+ if ($ this ->minItems !== null ) {
187+ $ schema ['minItems ' ] = $ this ->minItems ;
188+ }
189+ if ($ this ->maxItems !== null ) {
190+ $ schema ['maxItems ' ] = $ this ->maxItems ;
191+ }
192+ if ($ this ->uniqueItems !== null ) {
193+ $ schema ['uniqueItems ' ] = $ this ->uniqueItems ;
194+ }
171195
172196 // Object
173- if ($ this ->properties !== null ) $ schema ['properties ' ] = $ this ->properties ;
174- if ($ this ->required !== null ) $ schema ['required ' ] = $ this ->required ;
175- if ($ this ->additionalProperties !== null ) $ schema ['additionalProperties ' ] = $ this ->additionalProperties ;
197+ if ($ this ->properties !== null ) {
198+ $ schema ['properties ' ] = $ this ->properties ;
199+ }
200+ if ($ this ->required !== null ) {
201+ $ schema ['required ' ] = $ this ->required ;
202+ }
203+ if ($ this ->additionalProperties !== null ) {
204+ $ schema ['additionalProperties ' ] = $ this ->additionalProperties ;
205+ }
176206
177207 return $ schema ;
178208 }
0 commit comments