-
Notifications
You must be signed in to change notification settings - Fork 0
Adds toString method to Alpha2Code, Alpha3Code, and AlphaCode classes for better string representation. #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,14 +90,14 @@ public function contains(string $iana): bool | |
| * Finds a Timezone by its IANA identifier. | ||
| * | ||
| * @param string $iana The IANA timezone identifier to search for (e.g. America/Sao_Paulo). | ||
| * @return Timezone|null The matching Timezone, or null if not found in this country. | ||
| * @return Timezone The matching Timezone, or UTC if not found in this country. | ||
| */ | ||
| public function findByIdentifier(string $iana): ?Timezone | ||
| public function findByIdentifier(string $iana): Timezone | ||
| { | ||
| return array_find( | ||
| $this->items, | ||
| static fn(Timezone $timezone): bool => $timezone->value === $iana | ||
| ); | ||
| ) ?? Timezone::utc(); | ||
| } | ||
|
Comment on lines
+95
to
101
|
||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.