From 38e248e1884c94d26f16457c7ca47e0da10f2631 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Fri, 3 Nov 2023 12:54:17 +0000 Subject: [PATCH] Formatted method argument spacing Signed-off-by: Tom Wright --- src/Context.php | 5 +++-- src/Locale.php | 35 +++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/Context.php b/src/Context.php index 119ee3b..301795a 100644 --- a/src/Context.php +++ b/src/Context.php @@ -142,8 +142,9 @@ public function normalizeTimezoneString( /** * Parse and create DateTimeZone */ - protected function createTimezone(string $timezone): Timezone - { + protected function createTimezone( + string $timezone + ): Timezone { if (preg_match('/^[a-z]{3}$/', $timezone)) { $timezone = strtoupper($timezone); } elseif (preg_match('|^([a-z\-]+)/([a-z\-]+)$|', $timezone, $matches)) { diff --git a/src/Locale.php b/src/Locale.php index 30217bc..c891006 100644 --- a/src/Locale.php +++ b/src/Locale.php @@ -23,8 +23,9 @@ class Locale implements Dumpable * * @param array $subtags */ - public static function compose(array $subtags): static - { + public static function compose( + array $subtags + ): static { /** @phpstan-ignore-next-line */ if (false === ($locale = SysLocale::composeLocale($subtags))) { throw Exceptional::InvalidArguemnt( @@ -40,8 +41,9 @@ public static function compose(array $subtags): static /** * Init with string representation */ - final public function __construct(string $locale) - { + final public function __construct( + string $locale + ) { $this->canonical = SysLocale::canonicalize($locale); } @@ -49,8 +51,9 @@ final public function __construct(string $locale) /** * Get current display name */ - public function getName(?string $inLocale = null): string - { + public function getName( + ?string $inLocale = null + ): string { return SysLocale::getDisplayName($this->canonical, $inLocale); } @@ -66,8 +69,9 @@ public function getLanguage(): string /** * Get current language display name */ - public function getLanguageName(?string $inLocale = null): string - { + public function getLanguageName( + ?string $inLocale = null + ): string { return SysLocale::getDisplayLanguage($this->canonical, $inLocale); } @@ -89,8 +93,9 @@ public function getRegion(): ?string /** * Get current region display name */ - public function getRegionName(?string $inLocale = null): ?string - { + public function getRegionName( + ?string $inLocale = null + ): ?string { $output = SysLocale::getDisplayRegion($this->canonical, $inLocale); if (!strlen($output)) { @@ -118,8 +123,9 @@ public function getScript(): ?string /** * Get current script display name */ - public function getScriptName(?string $inLocale = null): ?string - { + public function getScriptName( + ?string $inLocale = null + ): ?string { $output = SysLocale::getDisplayScript($this->canonical, $inLocale); if (!strlen($output)) { @@ -149,8 +155,9 @@ public function getVariants(): array /** * Get current script variant name */ - public function getVariantName(?string $inLocale = null): ?string - { + public function getVariantName( + ?string $inLocale = null + ): ?string { $output = SysLocale::getDisplayVariant($this->canonical, $inLocale); if (!strlen((string)$output)) {