From 5af67b5f87d5dfc3e2d6c4b4ad68d80c6f31c449 Mon Sep 17 00:00:00 2001 From: Antonio Carlos Ribeiro Date: Tue, 24 Sep 2019 16:43:45 -0300 Subject: [PATCH] Use string class --- src/package/Data/Repository.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/package/Data/Repository.php b/src/package/Data/Repository.php index 0887b901..7759a076 100644 --- a/src/package/Data/Repository.php +++ b/src/package/Data/Repository.php @@ -2,6 +2,7 @@ namespace PragmaRX\Countries\Package\Data; +use IlluminateAgnostic\Str\Support\Str; use PragmaRX\Countries\Package\Services\Helper; use PragmaRX\Countries\Package\Services\Hydrator; use Psr\SimpleCache\CacheInterface as CacheContract; @@ -148,7 +149,7 @@ public function loadCountries() $this->countriesJson = $this->loadCountriesJson(); $overload = $this->helper->loadJsonFiles($this->helper->dataDir('countries/overload'))->mapWithKeys(function ($country, $code) { - return [upper($code) => $country]; + return [Str::upper($code) => $country]; }); $this->countriesJson = $this->countriesJson->overwrite($overload); @@ -207,11 +208,11 @@ public function all() public function currencies() { $currencies = $this->helper->loadJsonFiles($this->helper->dataDir('currencies/default'))->mapWithKeys(function ($country, $code) { - return [upper($code) => $country]; + return [Str::upper($code) => $country]; }); $overload = $this->helper->loadJsonFiles($this->helper->dataDir('currencies/overload'))->mapWithKeys(function ($country, $code) { - return [upper($code) => $country]; + return [Str::upper($code) => $country]; }); return $currencies->overwrite($overload);