@@ -19,48 +19,48 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfUnitedStates1900 extends CensusOfUnitedStates implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '01 JUN 1900'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '01 JUN 1900'; |
|
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'), |
|
39 | - new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'), |
|
40 | - new CensusColumnNull($this, 'Race', 'Color or race'), |
|
41 | - new CensusColumnSexMF($this, 'Sex', 'Sex'), |
|
42 | - new CensusColumnBirthMonth($this, 'Month', 'Month of birth'), |
|
43 | - new CensusColumnBirthYear($this, 'Year', 'Year of birth'), |
|
44 | - new CensusColumnAge($this, 'Age', 'Age at last birthday'), |
|
45 | - new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'), |
|
46 | - new CensusColumnYearsMarried($this, 'Marr', 'Number of years married'), |
|
47 | - new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'), |
|
48 | - new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'), |
|
49 | - new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'), |
|
50 | - new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'), |
|
51 | - new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'), |
|
52 | - new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'), |
|
53 | - new CensusColumnNull($this, 'US', 'Number of years in the United States'), |
|
54 | - new CensusColumnNull($this, 'Nat', 'Naturalization'), |
|
55 | - new CensusColumnOccupation($this, 'Occupation', 'Occupation, trade of profession'), |
|
56 | - new CensusColumnNull($this, 'Unemp', 'Months not unemployed'), |
|
57 | - new CensusColumnNull($this, 'School', 'Attended school (in months)'), |
|
58 | - new CensusColumnNull($this, 'Read', 'Can read'), |
|
59 | - new CensusColumnNull($this, 'Write', 'Can write'), |
|
60 | - new CensusColumnNull($this, 'Eng', 'Can speak English'), |
|
61 | - new CensusColumnNull($this, 'Home', 'Owned or rented'), |
|
62 | - new CensusColumnNull($this, 'Mort', 'Owned free or mortgaged'), |
|
63 | - new CensusColumnNull($this, 'Farm', 'Farm or house'), |
|
64 | - ); |
|
65 | - } |
|
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'), |
|
39 | + new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'), |
|
40 | + new CensusColumnNull($this, 'Race', 'Color or race'), |
|
41 | + new CensusColumnSexMF($this, 'Sex', 'Sex'), |
|
42 | + new CensusColumnBirthMonth($this, 'Month', 'Month of birth'), |
|
43 | + new CensusColumnBirthYear($this, 'Year', 'Year of birth'), |
|
44 | + new CensusColumnAge($this, 'Age', 'Age at last birthday'), |
|
45 | + new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'), |
|
46 | + new CensusColumnYearsMarried($this, 'Marr', 'Number of years married'), |
|
47 | + new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'), |
|
48 | + new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'), |
|
49 | + new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'), |
|
50 | + new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'), |
|
51 | + new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'), |
|
52 | + new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'), |
|
53 | + new CensusColumnNull($this, 'US', 'Number of years in the United States'), |
|
54 | + new CensusColumnNull($this, 'Nat', 'Naturalization'), |
|
55 | + new CensusColumnOccupation($this, 'Occupation', 'Occupation, trade of profession'), |
|
56 | + new CensusColumnNull($this, 'Unemp', 'Months not unemployed'), |
|
57 | + new CensusColumnNull($this, 'School', 'Attended school (in months)'), |
|
58 | + new CensusColumnNull($this, 'Read', 'Can read'), |
|
59 | + new CensusColumnNull($this, 'Write', 'Can write'), |
|
60 | + new CensusColumnNull($this, 'Eng', 'Can speak English'), |
|
61 | + new CensusColumnNull($this, 'Home', 'Owned or rented'), |
|
62 | + new CensusColumnNull($this, 'Mort', 'Owned free or mortgaged'), |
|
63 | + new CensusColumnNull($this, 'Farm', 'Farm or house'), |
|
64 | + ); |
|
65 | + } |
|
66 | 66 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1900 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1900 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 '01 JUN 1900'; |
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'), |
39 | 42 | new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'), |
@@ -19,35 +19,35 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfFrance1851 extends CensusOfFrance implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '16 JAN 1851'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '16 JAN 1851'; |
|
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, 'Professions', ''), |
|
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', 'Âge'), |
|
48 | - new CensusColumnNull($this, 'Fr', 'Français d’origine'), |
|
49 | - new CensusColumnNull($this, 'Nat', 'Naturalisés français'), |
|
50 | - new CensusColumnNull($this, 'Etr', 'Étrangers (indiquer leur pays d’origine)'), |
|
51 | - ); |
|
52 | - } |
|
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, 'Professions', ''), |
|
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', 'Âge'), |
|
48 | + new CensusColumnNull($this, 'Fr', 'Français d’origine'), |
|
49 | + new CensusColumnNull($this, 'Nat', 'Naturalisés français'), |
|
50 | + new CensusColumnNull($this, 'Etr', 'Étrangers (indiquer leur pays d’origine)'), |
|
51 | + ); |
|
52 | + } |
|
53 | 53 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfFrance1851 extends CensusOfFrance implements CensusInterface { |
|
21 | +class CensusOfFrance1851 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 '16 JAN 1851'; |
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 | * Birth place of the individual's mother. |
22 | 22 | */ |
23 | 23 | class CensusColumnMotherBirthPlace 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 | - $mother = $this->mother($individual); |
|
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 | + $mother = $this->mother($individual); |
|
34 | 34 | |
35 | - if ($mother) { |
|
36 | - return $this->notCountry($mother->getBirthPlace()); |
|
37 | - } else { |
|
38 | - return ''; |
|
39 | - } |
|
40 | - } |
|
35 | + if ($mother) { |
|
36 | + return $this->notCountry($mother->getBirthPlace()); |
|
37 | + } else { |
|
38 | + return ''; |
|
39 | + } |
|
40 | + } |
|
41 | 41 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * Birth place of the individual's mother. |
22 | 22 | */ |
23 | -class CensusColumnMotherBirthPlace extends AbstractCensusColumn implements CensusColumnInterface { |
|
23 | +class CensusColumnMotherBirthPlace 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 | $mother = $this->mother($individual); |
34 | 36 | |
35 | 37 | if ($mother) { |
@@ -19,32 +19,32 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfEngland1901 extends CensusOfEngland implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '31 MAR 1901'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '31 MAR 1901'; |
|
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, 'Emp', 'Employer, worker or own account'), |
|
45 | - new CensusColumnNull($this, 'Home', 'Working at home'), |
|
46 | - new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
47 | - new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'), |
|
48 | - ); |
|
49 | - } |
|
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, 'Emp', 'Employer, worker or own account'), |
|
45 | + new CensusColumnNull($this, 'Home', 'Working at home'), |
|
46 | + new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
47 | + new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'), |
|
48 | + ); |
|
49 | + } |
|
50 | 50 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfEngland1901 extends CensusOfEngland implements CensusInterface { |
|
21 | +class CensusOfEngland1901 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 '31 MAR 1901'; |
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 date of birth. |
22 | 22 | */ |
23 | 23 | class CensusColumnBirthDaySlashMonthYear 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/%n %Y'); |
|
37 | - } else { |
|
38 | - return ''; |
|
39 | - } |
|
40 | - } |
|
35 | + if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) { |
|
36 | + return $birth_date->minimumDate()->format('%j/%n %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 CensusColumnBirthDaySlashMonthYear extends AbstractCensusColumn implements CensusColumnInterface { |
|
23 | +class CensusColumnBirthDaySlashMonthYear 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,33 +19,33 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfUnitedStates1850 extends CensusOfUnitedStates implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '01 JUN 1850'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '01 JUN 1850'; |
|
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'), |
|
39 | - new CensusColumnAge($this, 'Age', 'Age'), |
|
40 | - new CensusColumnSexMF($this, 'Sex', 'Sex'), |
|
41 | - new CensusColumnNull($this, 'Color', 'White, black, or mulatto'), |
|
42 | - new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'), |
|
43 | - new CensusColumnNull($this, 'RE', 'Value of real estate owned'), |
|
44 | - new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'), |
|
45 | - new CensusColumnMarriedWithinYear($this, 'Mar', 'Married within the year'), |
|
46 | - new CensusColumnNull($this, 'School', 'Attended school within the year'), |
|
47 | - new CensusColumnNull($this, 'R+W', 'Persons over 20 years of age who cannot read and write'), |
|
48 | - new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, idiotic, pauper or convict'), |
|
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'), |
|
39 | + new CensusColumnAge($this, 'Age', 'Age'), |
|
40 | + new CensusColumnSexMF($this, 'Sex', 'Sex'), |
|
41 | + new CensusColumnNull($this, 'Color', 'White, black, or mulatto'), |
|
42 | + new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'), |
|
43 | + new CensusColumnNull($this, 'RE', 'Value of real estate owned'), |
|
44 | + new CensusColumnBirthPlaceSimple($this, 'Birthplace', 'Place of birth, naming the state, territory, or country'), |
|
45 | + new CensusColumnMarriedWithinYear($this, 'Mar', 'Married within the year'), |
|
46 | + new CensusColumnNull($this, 'School', 'Attended school within the year'), |
|
47 | + new CensusColumnNull($this, 'R+W', 'Persons over 20 years of age who cannot read and write'), |
|
48 | + new CensusColumnNull($this, 'Infirm', 'Whether deaf and dumb, blind, insane, idiotic, pauper or convict'), |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1850 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1850 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 '01 JUN 1850'; |
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'), |
39 | 42 | new CensusColumnAge($this, 'Age', 'Age'), |
@@ -19,33 +19,33 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfWales1901 extends CensusOfWales implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '31 MAR 1901'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '31 MAR 1901'; |
|
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, 'Emp', 'Employer, worker or own account'), |
|
45 | - new CensusColumnNull($this, 'Home', 'Working at home'), |
|
46 | - new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
47 | - new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'), |
|
48 | - new CensusColumnNull($this, 'Lang', 'Language spoken'), |
|
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, 'Emp', 'Employer, worker or own account'), |
|
45 | + new CensusColumnNull($this, 'Home', 'Working at home'), |
|
46 | + new CensusColumnBirthPlace($this, 'Birthplace', 'Where born'), |
|
47 | + new CensusColumnNull($this, 'Infirm', 'Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded'), |
|
48 | + new CensusColumnNull($this, 'Lang', 'Language spoken'), |
|
49 | + ); |
|
50 | + } |
|
51 | 51 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfWales1901 extends CensusOfWales implements CensusInterface { |
|
21 | +class CensusOfWales1901 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 '31 MAR 1901'; |
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'), |
@@ -19,34 +19,34 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfDenmark1916 extends CensusOfDenmark implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '01 FEB 1916'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '01 FEB 1916'; |
|
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, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'), |
|
39 | - new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'), |
|
40 | - new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'), |
|
41 | - new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'), |
|
42 | - new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'), |
|
43 | - new CensusColumnBirthPlace($this, 'Fødested', ''), |
|
44 | - new CensusColumnNull($this, '', ''), |
|
45 | - new CensusColumnNull($this, '', ''), |
|
46 | - new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'), |
|
47 | - new CensusColumnOccupation($this, 'Erhverv', ''), |
|
48 | - new CensusColumnNull($this, '', ''), |
|
49 | - new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'), |
|
50 | - ); |
|
51 | - } |
|
31 | + /** |
|
32 | + * The columns of the census. |
|
33 | + * |
|
34 | + * @return CensusColumnInterface[] |
|
35 | + */ |
|
36 | + public function columns() { |
|
37 | + return array( |
|
38 | + new CensusColumnFullName($this, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'), |
|
39 | + new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'), |
|
40 | + new CensusColumnBirthDaySlashMonthYear($this, 'Fødselsdag', 'Føderlsaar og Føderladag.'), |
|
41 | + new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'), |
|
42 | + new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'), |
|
43 | + new CensusColumnBirthPlace($this, 'Fødested', ''), |
|
44 | + new CensusColumnNull($this, '', ''), |
|
45 | + new CensusColumnNull($this, '', ''), |
|
46 | + new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'), |
|
47 | + new CensusColumnOccupation($this, 'Erhverv', ''), |
|
48 | + new CensusColumnNull($this, '', ''), |
|
49 | + new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'), |
|
50 | + ); |
|
51 | + } |
|
52 | 52 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1916 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1916 extends CensusOfDenmark 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 '01 FEB 1916'; |
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, 'Navn', 'Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)'), |
39 | 42 | new CensusColumnSexMK($this, 'Køn', 'Kjønnet. Mandkøn (M) eller Kvindekøn (K).'), |
@@ -22,33 +22,33 @@ |
||
22 | 22 | * The number of children who are still living. |
23 | 23 | */ |
24 | 24 | class CensusColumnChildrenLiving extends AbstractCensusColumn implements CensusColumnInterface { |
25 | - /** |
|
26 | - * Generate the likely value of this census column, based on available information. |
|
27 | - * |
|
28 | - * @param Individual $individual |
|
29 | - * @param Individual|null $head |
|
30 | - * |
|
31 | - * @return string |
|
32 | - */ |
|
33 | - public function generate(Individual $individual, Individual $head = null) { |
|
34 | - if ($individual->getSex() !== 'F') { |
|
35 | - return ''; |
|
36 | - } |
|
25 | + /** |
|
26 | + * Generate the likely value of this census column, based on available information. |
|
27 | + * |
|
28 | + * @param Individual $individual |
|
29 | + * @param Individual|null $head |
|
30 | + * |
|
31 | + * @return string |
|
32 | + */ |
|
33 | + public function generate(Individual $individual, Individual $head = null) { |
|
34 | + if ($individual->getSex() !== 'F') { |
|
35 | + return ''; |
|
36 | + } |
|
37 | 37 | |
38 | - $count = 0; |
|
39 | - foreach ($individual->getSpouseFamilies() as $family) { |
|
40 | - foreach ($family->getChildren() as $child) { |
|
41 | - if ( |
|
42 | - $child->getBirthDate()->isOK() && |
|
43 | - Date::compare($child->getBirthDate(), $this->date()) < 0 && |
|
44 | - $child->getBirthDate() != $child->getDeathDate() && |
|
45 | - (!$child->getDeathDate()->isOK() || Date::compare($child->getDeathDate(), $this->date()) > 0) |
|
46 | - ) { |
|
47 | - $count++; |
|
48 | - } |
|
49 | - } |
|
50 | - } |
|
38 | + $count = 0; |
|
39 | + foreach ($individual->getSpouseFamilies() as $family) { |
|
40 | + foreach ($family->getChildren() as $child) { |
|
41 | + if ( |
|
42 | + $child->getBirthDate()->isOK() && |
|
43 | + Date::compare($child->getBirthDate(), $this->date()) < 0 && |
|
44 | + $child->getBirthDate() != $child->getDeathDate() && |
|
45 | + (!$child->getDeathDate()->isOK() || Date::compare($child->getDeathDate(), $this->date()) > 0) |
|
46 | + ) { |
|
47 | + $count++; |
|
48 | + } |
|
49 | + } |
|
50 | + } |
|
51 | 51 | |
52 | - return (string) $count; |
|
53 | - } |
|
52 | + return (string) $count; |
|
53 | + } |
|
54 | 54 | } |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * The number of children who are still living. |
23 | 23 | */ |
24 | -class CensusColumnChildrenLiving extends AbstractCensusColumn implements CensusColumnInterface { |
|
24 | +class CensusColumnChildrenLiving extends AbstractCensusColumn implements CensusColumnInterface |
|
25 | +{ |
|
25 | 26 | /** |
26 | 27 | * Generate the likely value of this census column, based on available information. |
27 | 28 | * |
@@ -30,7 +31,8 @@ discard block |
||
30 | 31 | * |
31 | 32 | * @return string |
32 | 33 | */ |
33 | - public function generate(Individual $individual, Individual $head = null) { |
|
34 | + public function generate(Individual $individual, Individual $head = null) |
|
35 | + { |
|
34 | 36 | if ($individual->getSex() !== 'F') { |
35 | 37 | return ''; |
36 | 38 | } |