Skip to content

Commit

Permalink
Add type-hint for getMonthFormat function
Browse files Browse the repository at this point in the history
Add type information to the `getMonthFormat` function.

Bug: T384867
Change-Id: I5a5441458f456f15a4b2d2020a8f4612927942a6
  • Loading branch information
codders committed Jan 29, 2025
1 parent 774fbca commit fea5ac0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/includes/Formatters/MwTimeIsoFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private function getDayFormat( $dateFormat ) {
*
* @return string A date format for the month that roundtrips the Wikibase TimeParsers.
*/
private function getMonthFormat( $dateFormat ) {
private function getMonthFormat( ?string $dateFormat ): string {
if ( $dateFormat && preg_match( '/(?:[FMn]|(?<!x)m|xg)[.,]?/', $dateFormat, $matches ) ) {
return $matches[0];
}
Expand Down

0 comments on commit fea5ac0

Please # to comment.