@@ -21,13 +21,6 @@ class ZoneRepository implements ZoneRepositoryInterface
2121 */
2222 protected $ definitionPath ;
2323
24- /**
25- * The subdivision repository.
26- *
27- * @var SubdivisionRepositoryInterface
28- */
29- protected $ subdivisionRepository ;
30-
3124 /**
3225 * Zone index.
3326 *
@@ -45,13 +38,11 @@ class ZoneRepository implements ZoneRepositoryInterface
4538 /**
4639 * Creates a ZoneRepository instance.
4740 *
48- * @param string $definitionPath Path to the zone definitions.
49- * @param SubdivisionRepositoryInterface $subdivisionRepository The subdivision repository.
41+ * @param string $definitionPath Path to the zone definitions.
5042 */
51- public function __construct ($ definitionPath, SubdivisionRepositoryInterface $ subdivisionRepository = null )
43+ public function __construct ($ definitionPath )
5244 {
5345 $ this ->definitionPath = $ definitionPath ;
54- $ this ->subdivisionRepository = $ subdivisionRepository ?: new SubdivisionRepository ();
5546 }
5647
5748 /**
@@ -164,17 +155,6 @@ protected function createZoneFromDefinition(array $definition)
164155 */
165156 protected function createZoneMemberCountryFromDefinition (array $ definition )
166157 {
167- // Load any referenced subdivisions.
168- if (isset ($ definition ['administrative_area ' ])) {
169- $ definition ['administrative_area ' ] = $ this ->subdivisionRepository ->get ($ definition ['administrative_area ' ]);
170- }
171- if (isset ($ definition ['locality ' ])) {
172- $ definition ['locality ' ] = $ this ->subdivisionRepository ->get ($ definition ['locality ' ]);
173- }
174- if (isset ($ definition ['dependent_locality ' ])) {
175- $ definition ['dependent_locality ' ] = $ this ->subdivisionRepository ->get ($ definition ['dependent_locality ' ]);
176- }
177-
178158 $ zoneMember = new ZoneMemberCountry ();
179159 $ setValues = \Closure::bind (function ($ definition ) {
180160 $ this ->id = $ definition ['id ' ];
0 commit comments