-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: error when mapping from stdClass to constructor with nullable/op…
…tional arguments (#184) I was trying to understand why generated code looks weird when mapping from array/stdClass to class which has constructor with nullable/optional arguments. NullableTransformer is not supposed to be applied when creating from constructor because nullable/optional already handled. With this fix, generated code instead of looking like this: ```PHP $value_1 = null; if (null !== $value->ResponseDescription) { $value_1 = $value->ResponseDescription; } $constructarg_1 = $value_1 ?? NULL; ``` Look like this: ```PHP $constructarg_1 = $value->ResponseDescription ?? NULL; ``` Which also fixes #181
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters