Skip to content

Commit b0ad711

Browse files
committed
Use nullable return type for TypePart::getTypeNullable()
This is to prevent a fatal error when setNullable has not been called explicitly, when generateNullableTypes is enabled. Error was: PHP Fatal error: Uncaught TypeError: Return value of gossi\codegen\model\PhpParameter::getNullable() must be of the type bool, null returned in […]/vendor/gossi/php-code-generator/src/model/parts/TypePart.php:75
1 parent b6316db commit b0ad711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model/parts/TypePart.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getTypeDescription(): ?string {
7171
*
7272
* @return bool
7373
*/
74-
public function getNullable(): bool {
74+
public function getNullable(): ?bool {
7575
return $this->typeNullable;
7676
}
7777

0 commit comments

Comments
 (0)