Skip to content

Commit

Permalink
Yaml format (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmponos authored and frederikbosch committed Jun 19, 2017
1 parent 9c8f12b commit 51d13cc
Show file tree
Hide file tree
Showing 6 changed files with 932 additions and 7 deletions.
4 changes: 3 additions & 1 deletion bin/fetch-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
use MoneyPHP\IsoCurrencies\Fetcher;
use MoneyPHP\IsoCurrencies\Serializer\JsonSerializer;
use MoneyPHP\IsoCurrencies\Serializer\PhpExportSerializer;
use MoneyPHP\IsoCurrencies\Serializer\YamlSerializer;

require_once __DIR__."/../vendor/autoload.php";
require_once __DIR__ . "/../vendor/autoload.php";

$fetcher = new Fetcher(
'http://www.currency-iso.org/dam/downloads/lists/list_one.xml'
);

$fetcher->saveTo(__DIR__ . "/../resources/current.php", new PhpExportSerializer());
$fetcher->saveTo(__DIR__ . "/../resources/current.json", new JsonSerializer());
$fetcher->saveTo(__DIR__ . "/../resources/current.yaml", new YamlSerializer());
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
}
],
"require": {
"php": ">=5.5"
"php": ">=5.5",
"symfony/yaml": "^3.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion resources/current.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions resources/current.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'AZN' =>
array (
'alphabeticCode' => 'AZN',
'currency' => 'Azerbaijanian Manat',
'currency' => 'Azerbaijan Manat',
'minorUnit' => 2,
'numericCode' => 944,
),
Expand Down Expand Up @@ -289,7 +289,7 @@
'KMF' =>
array (
'alphabeticCode' => 'KMF',
'currency' => 'Comoro Franc',
'currency' => 'Comorian Franc ',
'minorUnit' => 0,
'numericCode' => 174,
),
Expand Down Expand Up @@ -464,7 +464,7 @@
'GNF' =>
array (
'alphabeticCode' => 'GNF',
'currency' => 'Guinea Franc',
'currency' => 'Guinean Franc',
'minorUnit' => 0,
'numericCode' => 324,
),
Expand Down Expand Up @@ -611,7 +611,7 @@
'LAK' =>
array (
'alphabeticCode' => 'LAK',
'currency' => 'Kip',
'currency' => 'Lao Kip',
'minorUnit' => 2,
'numericCode' => 418,
),
Expand Down
Loading

0 comments on commit 51d13cc

Please sign in to comment.