File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 33namespace Ensi \LaravelOpenApiServerGenerator \Generators ;
44
55use cebe \openapi \SpecObjectInterface ;
6- use Ensi \LaravelOpenApiServerGenerator \Utils \PhpDocGenerator ;
76use InvalidArgumentException ;
87use LogicException ;
98use stdClass ;
@@ -50,7 +49,7 @@ private function extractEnums(stdClass $openApiData): array
5049
5150 private function getEnumType (stdClass $ schema , string $ enumName ): string
5251 {
53- return match ($ schema ->type ){
52+ return match ($ schema ->type ) {
5453 "integer " => "int " ,
5554 "string " => "string " ,
5655 default => throw new LogicException ("Enum {$ enumName } has invalid type ' {$ schema ->type }'. Supported types are: ['integer', 'string'] " ),
@@ -78,8 +77,8 @@ private function convertEnumSchemaToCases(stdClass $schema): string
7877
7978 private function convertEnumSchemaToPhpDoc (stdClass $ schema ): string
8079 {
81- return $ schema ->description
82- ? "\n" . $ this ->phpDocGenerator ->fromText (text: $ schema ->description , deleteEmptyLines: true )
80+ return $ schema ->description
81+ ? "\n" . $ this ->phpDocGenerator ->fromText (text: $ schema ->description , deleteEmptyLines: true )
8382 : "\n" ;
8483 }
8584}
You can’t perform that action at this time.
0 commit comments