Permalink
Browse files

Switch to 4 space indents, Zend-style indenting

  • Loading branch information...
Dave Miller
Dave Miller committed Nov 6, 2010
1 parent 3e94839 commit d7378586d627152de05f53984a294caf6f6758c8
Showing with 280 additions and 289 deletions.
  1. +21 −27 classes/djmCountries.php
  2. +247 −248 data/country-list.php
  3. +12 −14 smarty/function.select_country.php
View
@@ -26,37 +26,31 @@
class djmCountries
{
-
- public static function getList()
- {
- return require dirname(__FILE__) . '/../data/country-list.php';
- }
-
- public static function codeToCountry($code)
- {
- $countries = self::getList();
- if (isset($countries[$code]))
+
+ public static function getList()
{
- return $countries[$code];
+ return require dirname(__FILE__) . '/../data/country-list.php';
}
- else
+
+ public static function codeToCountry($code)
{
- return null;
+ $countries = self::getList();
+ if (isset($countries[$code])) {
+ return $countries[$code];
+ } else {
+ return null;
+ }
}
- }
-
- public static function countryToCode($value)
- {
- $value = strtolower($value);
- foreach (self::getList() as $code => $country)
+
+ public static function countryToCode($value)
{
- if (strtolower($country) == $value)
- {
- return $code;
- }
+ $value = strtolower($value);
+ foreach (self::getList() as $code => $country) {
+ if (strtolower($country) == $value) {
+ return $code;
+ }
+ }
+ return null;
}
- return null;
- }
-
+
}
-
Oops, something went wrong.

0 comments on commit d737858

Please sign in to comment.