@@ -79,7 +79,7 @@ class CountryRepository implements CountryRepositoryInterface
7979 * @param string|null $definitionPath The path to the country definitions.
8080 * Defaults to 'resources/country'.
8181 */
82- public function __construct (string $ defaultLocale = 'en ' , string $ fallbackLocale = 'en ' , string $ definitionPath = null )
82+ public function __construct (string $ defaultLocale = 'en ' , string $ fallbackLocale = 'en ' , ? string $ definitionPath = null )
8383 {
8484 $ this ->defaultLocale = $ defaultLocale ;
8585 $ this ->fallbackLocale = $ fallbackLocale ;
@@ -89,7 +89,7 @@ public function __construct(string $defaultLocale = 'en', string $fallbackLocale
8989 /**
9090 * {@inheritdoc}
9191 */
92- public function get (string $ countryCode , string $ locale = null ): Country
92+ public function get (string $ countryCode , ? string $ locale = null ): Country
9393 {
9494 $ countryCode = strtoupper ($ countryCode );
9595 $ baseDefinitions = $ this ->getBaseDefinitions ();
@@ -112,7 +112,7 @@ public function get(string $countryCode, string $locale = null): Country
112112 /**
113113 * {@inheritdoc}
114114 */
115- public function getAll (string $ locale = null ): array
115+ public function getAll (? string $ locale = null ): array
116116 {
117117 $ locale = $ locale ?: $ this ->defaultLocale ;
118118 $ locale = Locale::resolve ($ this ->availableLocales , $ locale , $ this ->fallbackLocale );
@@ -136,7 +136,7 @@ public function getAll(string $locale = null): array
136136 /**
137137 * {@inheritdoc}
138138 */
139- public function getList (string $ locale = null ): array
139+ public function getList (? string $ locale = null ): array
140140 {
141141 $ locale = $ locale ?: $ this ->defaultLocale ;
142142 $ locale = Locale::resolve ($ this ->availableLocales , $ locale , $ this ->fallbackLocale );
0 commit comments