Skip to content

Commit 2016dc6

Browse files
authored
Merge pull request #73 from DoclerLabs/fix-nullable-return-typehint-for-schemas
fix nullable return type hint for schema
2 parents 6110d16 + f8bf26c commit 2016dc6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [9.1.1] - 2022.05.09
8+
### Fixed
9+
- Return type for ::toSchema cannot be nullable
10+
711
## [9.1.0] - 2022.05.05
812
### Added
913
- Added support for non string enums (no constant for enum value is generated in this case)

src/Generator/SchemaMapperGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected function generateMap(Field $root): ClassMethod
173173
->makePublic()
174174
->addParam($payloadParam)
175175
->addStmts($statements)
176-
->setReturnType($root->getPhpTypeHint(), $root->isNullable())
176+
->setReturnType($root->getPhpTypeHint())
177177
->composeDocBlock(
178178
[$payloadParam],
179179
$root->getPhpDocType(false),

0 commit comments

Comments
 (0)