Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #30869 [Validator] Define null return type for Constraint::getD…
…efaultOption() (jaikdean) This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #30869). Discussion ---------- [Validator] Define null return type for Constraint::getDefaultOption() | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | The `Constraint::getDefaultOption()` method is documented with a return type of `string`, but has no `return` statement. This behaviour is expected, as the return value is compared against `null` elsewhere in the code, but the docblock causes problems with static analysis when extending this class. This PR corrects the documented return type to `string|null` and adds an explicit `return null`. Commits ------- 03987f2 Define null return type for Constraint::getDefaultOption()
- Loading branch information