Skip to content

Commit

Permalink
Use string class
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Sep 24, 2019
1 parent c398f7a commit 5af67b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/package/Data/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5af67b5

Please sign in to comment.