@@ 85-90 (lines=6) @@ | ||
82 | public function find(string $id) |
|
83 | { |
|
84 | switch (strlen($id)) { |
|
85 | case 6; |
|
86 | $provinceId = substr($id, 0, 2); |
|
87 | $districtId = substr($id, 2, 2); |
|
88 | $communeId = substr($id, 2, 2); |
|
89 | $tercId = null; |
|
90 | break; |
|
91 | case 7: |
|
92 | $provinceId = substr($id, 0, 2); |
|
93 | $districtId = substr($id, 2, 2); |
|
@@ 91-96 (lines=6) @@ | ||
88 | $communeId = substr($id, 2, 2); |
|
89 | $tercId = null; |
|
90 | break; |
|
91 | case 7: |
|
92 | $provinceId = substr($id, 0, 2); |
|
93 | $districtId = substr($id, 2, 2); |
|
94 | $communeId = substr($id, 2, 2); |
|
95 | $tercId = $id; |
|
96 | break; |
|
97 | default: |
|
98 | throw new InvalidArgument(sprintf('CommuneSymbol malformed, it has %s chars', strlen($id))); |
|
99 | break; |