@@ -21,15 +21,15 @@ |
||
21 | 21 | * The individual's mother's birth place. |
22 | 22 | */ |
23 | 23 | class CensusColumnMotherBirthPlaceSimple extends CensusColumnMotherBirthPlace implements CensusColumnInterface { |
24 | - /** |
|
25 | - * Generate the likely value of this census column, based on available information. |
|
26 | - * |
|
27 | - * @param Individual $individual |
|
28 | - * @param Individual|null $head |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | - return $this->lastPartOfPlace(parent::generate($individual, $head)); |
|
34 | - } |
|
24 | + /** |
|
25 | + * Generate the likely value of this census column, based on available information. |
|
26 | + * |
|
27 | + * @param Individual $individual |
|
28 | + * @param Individual|null $head |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function generate(Individual $individual, Individual $head = null) { |
|
33 | + return $this->lastPartOfPlace(parent::generate($individual, $head)); |
|
34 | + } |
|
35 | 35 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * The individual's mother's birth place. |
22 | 22 | */ |
23 | -class CensusColumnMotherBirthPlaceSimple extends CensusColumnMotherBirthPlace implements CensusColumnInterface { |
|
23 | +class CensusColumnMotherBirthPlaceSimple extends CensusColumnMotherBirthPlace implements CensusColumnInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Generate the likely value of this census column, based on available information. |
26 | 27 | * |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return string |
31 | 32 | */ |
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | + public function generate(Individual $individual, Individual $head = null) |
|
34 | + { |
|
33 | 35 | return $this->lastPartOfPlace(parent::generate($individual, $head)); |
34 | 36 | } |
35 | 37 | } |
@@ -19,33 +19,33 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfEngland1891 extends CensusOfEngland implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '05 APR 1891'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '05 APR 1891'; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * The columns of the census. |
|
33 | - * |
|
34 | - * @return CensusColumnInterface[] |
|
35 | - */ |
|
36 | - public function columns() { |
|
37 | - return array( |
|
38 | - new CensusColumnFullName($this, 'Name', 'Name and surname'), |
|
39 | - new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
|
40 | - new CensusColumnConditionEnglish($this, 'Condition', 'Condition'), |
|
41 | - new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'), |
|
42 | - new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'), |
|
43 | - new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'), |
|
44 | - new CensusColumnNull($this, 'Empl', 'Employer'), |
|
45 | - new CensusColumnNull($this, 'Empd', 'Employed'), |
|
46 | - new CensusColumnNull($this, 'OAC', 'Own account'), |
|
47 | - new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
48 | - new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic or imbecile'), |
|
49 | - ); |
|
50 | - } |
|
31 | + /** |
|
32 | + * The columns of the census. |
|
33 | + * |
|
34 | + * @return CensusColumnInterface[] |
|
35 | + */ |
|
36 | + public function columns() { |
|
37 | + return array( |
|
38 | + new CensusColumnFullName($this, 'Name', 'Name and surname'), |
|
39 | + new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
|
40 | + new CensusColumnConditionEnglish($this, 'Condition', 'Condition'), |
|
41 | + new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'), |
|
42 | + new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'), |
|
43 | + new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'), |
|
44 | + new CensusColumnNull($this, 'Empl', 'Employer'), |
|
45 | + new CensusColumnNull($this, 'Empd', 'Employed'), |
|
46 | + new CensusColumnNull($this, 'OAC', 'Own account'), |
|
47 | + new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
48 | + new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic or imbecile'), |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfEngland1891 extends CensusOfEngland implements CensusInterface { |
|
21 | +class CensusOfEngland1891 extends CensusOfEngland implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '05 APR 1891'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return CensusColumnInterface[] |
35 | 37 | */ |
36 | - public function columns() { |
|
38 | + public function columns() |
|
39 | + { |
|
37 | 40 | return array( |
38 | 41 | new CensusColumnFullName($this, 'Name', 'Name and surname'), |
39 | 42 | new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
@@ -21,21 +21,21 @@ |
||
21 | 21 | * The individual's full name. |
22 | 22 | */ |
23 | 23 | class CensusColumnSurnameGivenNameInitial extends CensusColumnFullName { |
24 | - /** |
|
25 | - * Generate the likely value of this census column, based on available information. |
|
26 | - * |
|
27 | - * @param Individual $individual |
|
28 | - * @param Individual|null $head |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | - $name = $this->nameAtCensusDate($individual, $this->date()); |
|
34 | - $given = $name['givn']; |
|
35 | - if (strpos($given, ' ') === false) { |
|
36 | - return $name['surname'] . ', ' . $given; |
|
37 | - } else { |
|
38 | - return $name['surname'] . ', ' . substr($given, 0, strpos($given, ' ') + 2); |
|
39 | - } |
|
40 | - } |
|
24 | + /** |
|
25 | + * Generate the likely value of this census column, based on available information. |
|
26 | + * |
|
27 | + * @param Individual $individual |
|
28 | + * @param Individual|null $head |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function generate(Individual $individual, Individual $head = null) { |
|
33 | + $name = $this->nameAtCensusDate($individual, $this->date()); |
|
34 | + $given = $name['givn']; |
|
35 | + if (strpos($given, ' ') === false) { |
|
36 | + return $name['surname'] . ', ' . $given; |
|
37 | + } else { |
|
38 | + return $name['surname'] . ', ' . substr($given, 0, strpos($given, ' ') + 2); |
|
39 | + } |
|
40 | + } |
|
41 | 41 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * The individual's full name. |
22 | 22 | */ |
23 | -class CensusColumnSurnameGivenNameInitial extends CensusColumnFullName { |
|
23 | +class CensusColumnSurnameGivenNameInitial extends CensusColumnFullName |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Generate the likely value of this census column, based on available information. |
26 | 27 | * |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return string |
31 | 32 | */ |
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | + public function generate(Individual $individual, Individual $head = null) |
|
34 | + { |
|
33 | 35 | $name = $this->nameAtCensusDate($individual, $this->date()); |
34 | 36 | $given = $name['givn']; |
35 | 37 | if (strpos($given, ' ') === false) { |
@@ -19,37 +19,37 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfUnitedStates1810 extends CensusOfUnitedStates implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '06 AUG 1810'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '06 AUG 1810'; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * The columns of the census. |
|
33 | - * |
|
34 | - * @return CensusColumnInterface[] |
|
35 | - */ |
|
36 | - public function columns() { |
|
37 | - return array( |
|
38 | - new CensusColumnFullName($this, 'Name', 'Name of head of family'), |
|
39 | - new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'), |
|
40 | - new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'), |
|
41 | - new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'), |
|
42 | - new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'), |
|
43 | - new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'), |
|
44 | - new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'), |
|
45 | - new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'), |
|
46 | - new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'), |
|
47 | - new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'), |
|
48 | - new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'), |
|
49 | - new CensusColumnNull($this, 'Free', 'All other free persons, except Indians not taxed'), |
|
50 | - new CensusColumnNull($this, 'Slaves', 'Number of slaves'), |
|
51 | - new CensusColumnNull($this, 'Total', 'Total number of individuals'), |
|
31 | + /** |
|
32 | + * The columns of the census. |
|
33 | + * |
|
34 | + * @return CensusColumnInterface[] |
|
35 | + */ |
|
36 | + public function columns() { |
|
37 | + return array( |
|
38 | + new CensusColumnFullName($this, 'Name', 'Name of head of family'), |
|
39 | + new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'), |
|
40 | + new CensusColumnNull($this, 'M10-16', 'Free white males 10-16 years'), |
|
41 | + new CensusColumnNull($this, 'M16-26', 'Free white males 16-26 years'), |
|
42 | + new CensusColumnNull($this, 'M26-45', 'Free white males 26-45 years'), |
|
43 | + new CensusColumnNull($this, 'M45+', 'Free white males 45+ years'), |
|
44 | + new CensusColumnNull($this, 'F0-10', 'Free white females 0-10 years'), |
|
45 | + new CensusColumnNull($this, 'F10-16', 'Free white females 10-16 years'), |
|
46 | + new CensusColumnNull($this, 'F16-26', 'Free white females 16-26 years'), |
|
47 | + new CensusColumnNull($this, 'F26-45', 'Free white females 26-45 years'), |
|
48 | + new CensusColumnNull($this, 'F45+', 'Free white females 45+ years'), |
|
49 | + new CensusColumnNull($this, 'Free', 'All other free persons, except Indians not taxed'), |
|
50 | + new CensusColumnNull($this, 'Slaves', 'Number of slaves'), |
|
51 | + new CensusColumnNull($this, 'Total', 'Total number of individuals'), |
|
52 | 52 | |
53 | - ); |
|
54 | - } |
|
53 | + ); |
|
54 | + } |
|
55 | 55 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1810 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1810 extends CensusOfUnitedStates implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '06 AUG 1810'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return CensusColumnInterface[] |
35 | 37 | */ |
36 | - public function columns() { |
|
38 | + public function columns() |
|
39 | + { |
|
37 | 40 | return array( |
38 | 41 | new CensusColumnFullName($this, 'Name', 'Name of head of family'), |
39 | 42 | new CensusColumnNull($this, 'M0-10', 'Free white males 0-10 years'), |
@@ -19,32 +19,32 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfFrance1846 extends CensusOfFrance implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '15 JAN 1846'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '15 JAN 1846'; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * The columns of the census. |
|
33 | - * |
|
34 | - * @return CensusColumnInterface[] |
|
35 | - */ |
|
36 | - public function columns() { |
|
37 | - return array( |
|
38 | - new CensusColumnSurname($this, 'Noms', 'Noms de famille'), |
|
39 | - new CensusColumnGivenNames($this, 'Prénoms', ''), |
|
40 | - new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'), |
|
41 | - new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''), |
|
42 | - new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'), |
|
43 | - new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''), |
|
44 | - new CensusColumnConditionFrenchFille($this, 'Filles', ''), |
|
45 | - new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'), |
|
46 | - new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''), |
|
47 | - new CensusColumnAge($this, 'Âge', ''), |
|
48 | - ); |
|
49 | - } |
|
31 | + /** |
|
32 | + * The columns of the census. |
|
33 | + * |
|
34 | + * @return CensusColumnInterface[] |
|
35 | + */ |
|
36 | + public function columns() { |
|
37 | + return array( |
|
38 | + new CensusColumnSurname($this, 'Noms', 'Noms de famille'), |
|
39 | + new CensusColumnGivenNames($this, 'Prénoms', ''), |
|
40 | + new CensusColumnOccupation($this, 'Titres', 'Titres, qualifications, état ou profession et fonctions'), |
|
41 | + new CensusColumnConditionFrenchGarcon($this, 'Garçons', ''), |
|
42 | + new CensusColumnConditionFrenchHomme($this, 'Hommes', 'Hommes mariés'), |
|
43 | + new CensusColumnConditionFrenchVeuf($this, 'Veufs', ''), |
|
44 | + new CensusColumnConditionFrenchFille($this, 'Filles', ''), |
|
45 | + new CensusColumnConditionFrenchFemme($this, 'Femmes', 'Femmes mariées'), |
|
46 | + new CensusColumnConditionFrenchVeuve($this, 'Veuves', ''), |
|
47 | + new CensusColumnAge($this, 'Âge', ''), |
|
48 | + ); |
|
49 | + } |
|
50 | 50 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfFrance1846 extends CensusOfFrance implements CensusInterface { |
|
21 | +class CensusOfFrance1846 extends CensusOfFrance implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '15 JAN 1846'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return CensusColumnInterface[] |
35 | 37 | */ |
36 | - public function columns() { |
|
38 | + public function columns() |
|
39 | + { |
|
37 | 40 | return array( |
38 | 41 | new CensusColumnSurname($this, 'Noms', 'Noms de famille'), |
39 | 42 | new CensusColumnGivenNames($this, 'Prénoms', ''), |
@@ -21,21 +21,21 @@ |
||
21 | 21 | * The individual's date of birth. |
22 | 22 | */ |
23 | 23 | class CensusColumnBirthDayMonthSlashYear extends AbstractCensusColumn implements CensusColumnInterface { |
24 | - /** |
|
25 | - * Generate the likely value of this census column, based on available information. |
|
26 | - * |
|
27 | - * @param Individual $individual |
|
28 | - * @param Individual|null $head |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | - $birth_date = $individual->getBirthDate(); |
|
24 | + /** |
|
25 | + * Generate the likely value of this census column, based on available information. |
|
26 | + * |
|
27 | + * @param Individual $individual |
|
28 | + * @param Individual|null $head |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function generate(Individual $individual, Individual $head = null) { |
|
33 | + $birth_date = $individual->getBirthDate(); |
|
34 | 34 | |
35 | - if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) { |
|
36 | - return $birth_date->minimumDate()->format('%j %M/%Y'); |
|
37 | - } else { |
|
38 | - return ''; |
|
39 | - } |
|
40 | - } |
|
35 | + if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) { |
|
36 | + return $birth_date->minimumDate()->format('%j %M/%Y'); |
|
37 | + } else { |
|
38 | + return ''; |
|
39 | + } |
|
40 | + } |
|
41 | 41 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * The individual's date of birth. |
22 | 22 | */ |
23 | -class CensusColumnBirthDayMonthSlashYear extends AbstractCensusColumn implements CensusColumnInterface { |
|
23 | +class CensusColumnBirthDayMonthSlashYear extends AbstractCensusColumn implements CensusColumnInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Generate the likely value of this census column, based on available information. |
26 | 27 | * |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return string |
31 | 32 | */ |
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | + public function generate(Individual $individual, Individual $head = null) |
|
34 | + { |
|
33 | 35 | $birth_date = $individual->getBirthDate(); |
34 | 36 | |
35 | 37 | if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) { |
@@ -19,30 +19,30 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfWales1871 extends CensusOfWales implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '02 APR 1871'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '02 APR 1871'; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * The columns of the census. |
|
33 | - * |
|
34 | - * @return CensusColumnInterface[] |
|
35 | - */ |
|
36 | - public function columns() { |
|
37 | - return array( |
|
38 | - new CensusColumnFullName($this, 'Name', 'Name and surname'), |
|
39 | - new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
|
40 | - new CensusColumnConditionEnglish($this, 'Condition', 'Condition'), |
|
41 | - new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'), |
|
42 | - new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'), |
|
43 | - new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'), |
|
44 | - new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
45 | - new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'), |
|
46 | - ); |
|
47 | - } |
|
31 | + /** |
|
32 | + * The columns of the census. |
|
33 | + * |
|
34 | + * @return CensusColumnInterface[] |
|
35 | + */ |
|
36 | + public function columns() { |
|
37 | + return array( |
|
38 | + new CensusColumnFullName($this, 'Name', 'Name and surname'), |
|
39 | + new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
|
40 | + new CensusColumnConditionEnglish($this, 'Condition', 'Condition'), |
|
41 | + new CensusColumnAgeMale($this, 'AgeM', 'Age (males)'), |
|
42 | + new CensusColumnAgeFemale($this, 'AgeF', 'Age (females)'), |
|
43 | + new CensusColumnOccupation($this, 'Occupation', 'Rank, profession or occupation'), |
|
44 | + new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
45 | + new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, imbecile, idiot or lunatic'), |
|
46 | + ); |
|
47 | + } |
|
48 | 48 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfWales1871 extends CensusOfWales implements CensusInterface { |
|
21 | +class CensusOfWales1871 extends CensusOfWales implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '02 APR 1871'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return CensusColumnInterface[] |
35 | 37 | */ |
36 | - public function columns() { |
|
38 | + public function columns() |
|
39 | + { |
|
37 | 40 | return array( |
38 | 41 | new CensusColumnFullName($this, 'Name', 'Name and surname'), |
39 | 42 | new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
@@ -21,24 +21,24 @@ |
||
21 | 21 | * The individual's full name. |
22 | 22 | */ |
23 | 23 | class CensusColumnGivenNameInitial extends AbstractCensusColumn implements CensusColumnInterface { |
24 | - /** |
|
25 | - * Generate the likely value of this census column, based on available information. |
|
26 | - * |
|
27 | - * @param Individual $individual |
|
28 | - * @param Individual|null $head |
|
29 | - * |
|
30 | - * @return string |
|
31 | - */ |
|
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | - foreach ($individual->getAllNames() as $name) { |
|
34 | - $given = $name['givn']; |
|
35 | - if (strpos($given, ' ') === false) { |
|
36 | - return $given; |
|
37 | - } else { |
|
38 | - return substr($given, 0, strpos($given, ' ') + 2); |
|
39 | - } |
|
40 | - } |
|
24 | + /** |
|
25 | + * Generate the likely value of this census column, based on available information. |
|
26 | + * |
|
27 | + * @param Individual $individual |
|
28 | + * @param Individual|null $head |
|
29 | + * |
|
30 | + * @return string |
|
31 | + */ |
|
32 | + public function generate(Individual $individual, Individual $head = null) { |
|
33 | + foreach ($individual->getAllNames() as $name) { |
|
34 | + $given = $name['givn']; |
|
35 | + if (strpos($given, ' ') === false) { |
|
36 | + return $given; |
|
37 | + } else { |
|
38 | + return substr($given, 0, strpos($given, ' ') + 2); |
|
39 | + } |
|
40 | + } |
|
41 | 41 | |
42 | - return ''; |
|
43 | - } |
|
42 | + return ''; |
|
43 | + } |
|
44 | 44 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * The individual's full name. |
22 | 22 | */ |
23 | -class CensusColumnGivenNameInitial extends AbstractCensusColumn implements CensusColumnInterface { |
|
23 | +class CensusColumnGivenNameInitial extends AbstractCensusColumn implements CensusColumnInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Generate the likely value of this census column, based on available information. |
26 | 27 | * |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return string |
31 | 32 | */ |
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | + public function generate(Individual $individual, Individual $head = null) |
|
34 | + { |
|
33 | 35 | foreach ($individual->getAllNames() as $name) { |
34 | 36 | $given = $name['givn']; |
35 | 37 | if (strpos($given, ' ') === false) { |
@@ -19,23 +19,23 @@ |
||
19 | 19 | * Marital status. |
20 | 20 | */ |
21 | 21 | class CensusColumnConditionFrenchGarcon extends AbstractCensusColumnCondition { |
22 | - /* Text to display for married individuals */ |
|
23 | - protected $husband = ''; |
|
24 | - protected $wife = ''; |
|
22 | + /* Text to display for married individuals */ |
|
23 | + protected $husband = ''; |
|
24 | + protected $wife = ''; |
|
25 | 25 | |
26 | - /* Text to display for unmarried individuals */ |
|
27 | - protected $bachelor = '1'; |
|
28 | - protected $spinster = ''; |
|
26 | + /* Text to display for unmarried individuals */ |
|
27 | + protected $bachelor = '1'; |
|
28 | + protected $spinster = ''; |
|
29 | 29 | |
30 | - /* Text to display for children */ |
|
31 | - protected $boy = '1'; |
|
32 | - protected $girl = ''; |
|
30 | + /* Text to display for children */ |
|
31 | + protected $boy = '1'; |
|
32 | + protected $girl = ''; |
|
33 | 33 | |
34 | - /* Text to display for divorced individuals */ |
|
35 | - protected $divorce = ''; |
|
36 | - protected $divorcee = ''; |
|
34 | + /* Text to display for divorced individuals */ |
|
35 | + protected $divorce = ''; |
|
36 | + protected $divorcee = ''; |
|
37 | 37 | |
38 | - /* Text to display for widowed individuals (not yet implemented) */ |
|
39 | - protected $widower = ''; |
|
40 | - protected $widow = ''; |
|
38 | + /* Text to display for widowed individuals (not yet implemented) */ |
|
39 | + protected $widower = ''; |
|
40 | + protected $widow = ''; |
|
41 | 41 | } |
@@ -18,7 +18,8 @@ |
||
18 | 18 | /** |
19 | 19 | * Marital status. |
20 | 20 | */ |
21 | -class CensusColumnConditionFrenchGarcon extends AbstractCensusColumnCondition { |
|
21 | +class CensusColumnConditionFrenchGarcon extends AbstractCensusColumnCondition |
|
22 | +{ |
|
22 | 23 | /* Text to display for married individuals */ |
23 | 24 | protected $husband = ''; |
24 | 25 | protected $wife = ''; |