| @@ 167-178 (lines=12) @@ | ||
| 164 | } |
|
| 165 | } |
|
| 166 | ||
| 167 | protected function getStateAbbreviations($country = null) |
|
| 168 | { |
|
| 169 | $x = []; |
|
| 170 | foreach ($this->states as $c => $states) { |
|
| 171 | if ($country === null || $c === $country) { |
|
| 172 | foreach ($states as $state) { |
|
| 173 | $x[] = $state['abbr']; |
|
| 174 | } |
|
| 175 | } |
|
| 176 | } |
|
| 177 | return $x; |
|
| 178 | } |
|
| 179 | ||
| 180 | protected function getStateNames($country = null) |
|
| 181 | { |
|
| @@ 180-191 (lines=12) @@ | ||
| 177 | return $x; |
|
| 178 | } |
|
| 179 | ||
| 180 | protected function getStateNames($country = null) |
|
| 181 | { |
|
| 182 | $x = []; |
|
| 183 | foreach ($this->states as $c => $states) { |
|
| 184 | if ($country === null || $c === $country) { |
|
| 185 | foreach ($states as $state) { |
|
| 186 | $x[] = $state['name']; |
|
| 187 | } |
|
| 188 | } |
|
| 189 | } |
|
| 190 | return $x; |
|
| 191 | } |
|
| 192 | ||
| 193 | /** |
|
| 194 | * Determine if the validation rule passes. |
|