minor #29782 [Intl] make type-hinted arguments nullable (xabbuh)
This PR was merged into the 4.1 branch.
Discussion
----------
[Intl] make type-hinted arguments nullable
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
16ebeb395f
[Intl] make type-hinted arguments nullable
This commit is contained in:
commit
3299f272fc
@ -132,7 +132,7 @@ class IntlDateFormatter
|
||||
* @throws MethodArgumentValueNotImplementedException When $locale different than "en" or null is passed
|
||||
* @throws MethodArgumentValueNotImplementedException When $calendar different than GREGORIAN is passed
|
||||
*/
|
||||
public function __construct(?string $locale, int $datetype, int $timetype, $timezone = null, ?int $calendar = self::GREGORIAN, string $pattern = null)
|
||||
public function __construct(?string $locale, ?int $datetype, ?int $timetype, $timezone = null, ?int $calendar = self::GREGORIAN, string $pattern = null)
|
||||
{
|
||||
if ('en' !== $locale && null !== $locale) {
|
||||
throw new MethodArgumentValueNotImplementedException(__METHOD__, 'locale', $locale, 'Only the locale "en" is supported');
|
||||
|
Reference in New Issue
Block a user