summaryrefslogtreecommitdiff
path: root/app/Census/CensusColumnBornForeignParts.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Census/CensusColumnBornForeignParts.php')
-rw-r--r--app/Census/CensusColumnBornForeignParts.php54
1 files changed, 28 insertions, 26 deletions
diff --git a/app/Census/CensusColumnBornForeignParts.php b/app/Census/CensusColumnBornForeignParts.php
index 7a6d140a7c..f541b64ec8 100644
--- a/app/Census/CensusColumnBornForeignParts.php
+++ b/app/Census/CensusColumnBornForeignParts.php
@@ -21,33 +21,35 @@ use Fisharebest\Webtrees\Individual;
/**
* Was the individual born in "foreign parts".
*/
-class CensusColumnBornForeignParts extends AbstractCensusColumn implements CensusColumnInterface {
- /**
- * Generate the likely value of this census column, based on available information.
- *
- * @param Individual $individual
- * @param Individual $head
- *
- * @return string
- */
- public function generate(Individual $individual, Individual $head = null) {
- $birth_place = $individual->getBirthPlace()->lastPart();
- $census_place = $this->place();
+class CensusColumnBornForeignParts extends AbstractCensusColumn implements CensusColumnInterface
+{
+ /**
+ * Generate the likely value of this census column, based on available information.
+ *
+ * @param Individual $individual
+ * @param Individual $head
+ *
+ * @return string
+ */
+ public function generate(Individual $individual, Individual $head = null)
+ {
+ $birth_place = $individual->getBirthPlace()->lastPart();
+ $census_place = $this->place();
- if ($birth_place === 'Wales') {
- $birth_place = 'England';
- }
+ if ($birth_place === 'Wales') {
+ $birth_place = 'England';
+ }
- if ($census_place === 'Wales') {
- $census_place = 'England';
- }
+ if ($census_place === 'Wales') {
+ $census_place = 'England';
+ }
- if ($birth_place === $census_place || $birth_place === '') {
- return '';
- } elseif ($birth_place === 'England' || $birth_place === 'Scotland' || $birth_place === 'Ireland') {
- return substr($birth_place, 0, 1);
- } else {
- return 'F';
- }
- }
+ if ($birth_place === $census_place || $birth_place === '') {
+ return '';
+ } elseif ($birth_place === 'England' || $birth_place === 'Scotland' || $birth_place === 'Ireland') {
+ return substr($birth_place, 0, 1);
+ } else {
+ return 'F';
+ }
+ }
}