Can handle some mandatory fields (not all).

This commit is contained in:
James Cole
2017-12-09 20:02:26 +01:00
parent e488d7d84c
commit 2365fb69b4
9 changed files with 207 additions and 29 deletions

View File

@@ -13,7 +13,7 @@ use FireflyIII\Support\Import\Configuration\ConfigurationInterface;
*/
class SelectCountry implements ConfigurationInterface
{
private $allCountries
public static $allCountries
= [
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
@@ -282,7 +282,7 @@ class SelectCountry implements ConfigurationInterface
$countries = [];
/** @var SpectreProvider $provider */
foreach ($providers as $provider) {
$countries[$provider->country_code] = $this->allCountries[$provider->country_code] ?? $provider->country_code;
$countries[$provider->country_code] = self::$allCountries[$provider->country_code] ?? $provider->country_code;
}
asort($countries);