@@ -19,32 +19,32 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfFrance1856 extends CensusOfFrance implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '17 JAN 1856'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '17 JAN 1856'; |
|
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 | } |
@@ -19,45 +19,45 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfUnitedStates1880 extends CensusOfUnitedStates implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return 'JUN 1880'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return 'JUN 1880'; |
|
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 CensusColumnMonthIfBornWithinYear($this, 'Mon', 'If born within the year, state month'), |
|
42 | - new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
|
43 | - new CensusColumnNull($this, 'S', 'Single'), |
|
44 | - new CensusColumnNull($this, 'M', 'Married'), |
|
45 | - new CensusColumnNull($this, 'W/D', 'Widowed, Divorced'), |
|
46 | - new CensusColumnMarriedWithinYear($this, 'MY', 'Married during census year'), |
|
47 | - new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'), |
|
48 | - new CensusColumnNull($this, 'UnEm', 'Number of months the person has been unemployed during the census year'), |
|
49 | - new CensusColumnNull($this, 'Sick', 'Sickness or disability'), |
|
50 | - new CensusColumnNull($this, 'Blind', 'Blind'), |
|
51 | - new CensusColumnNull($this, 'DD', 'Deaf and dumb'), |
|
52 | - new CensusColumnNull($this, 'Idiotic', 'Idiotic'), |
|
53 | - new CensusColumnNull($this, 'Insane', 'Insane'), |
|
54 | - new CensusColumnNull($this, 'Disabled', 'Maimed, crippled, bedridden or otherwise disabled'), |
|
55 | - new CensusColumnNull($this, 'School', 'Attended school within the census year'), |
|
56 | - new CensusColumnNull($this, 'Read', 'Cannot read'), |
|
57 | - new CensusColumnNull($this, 'Write', 'Cannot write'), |
|
58 | - new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth, naming the state, territory, or country'), |
|
59 | - new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father, naming the state, territory, or country'), |
|
60 | - new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother, naming the state, territory, or country'), |
|
61 | - ); |
|
62 | - } |
|
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 CensusColumnMonthIfBornWithinYear($this, 'Mon', 'If born within the year, state month'), |
|
42 | + new CensusColumnRelationToHead($this, 'Relation', 'Relation to head of household'), |
|
43 | + new CensusColumnNull($this, 'S', 'Single'), |
|
44 | + new CensusColumnNull($this, 'M', 'Married'), |
|
45 | + new CensusColumnNull($this, 'W/D', 'Widowed, Divorced'), |
|
46 | + new CensusColumnMarriedWithinYear($this, 'MY', 'Married during census year'), |
|
47 | + new CensusColumnOccupation($this, 'Occupation', 'Profession, occupation, or trade'), |
|
48 | + new CensusColumnNull($this, 'UnEm', 'Number of months the person has been unemployed during the census year'), |
|
49 | + new CensusColumnNull($this, 'Sick', 'Sickness or disability'), |
|
50 | + new CensusColumnNull($this, 'Blind', 'Blind'), |
|
51 | + new CensusColumnNull($this, 'DD', 'Deaf and dumb'), |
|
52 | + new CensusColumnNull($this, 'Idiotic', 'Idiotic'), |
|
53 | + new CensusColumnNull($this, 'Insane', 'Insane'), |
|
54 | + new CensusColumnNull($this, 'Disabled', 'Maimed, crippled, bedridden or otherwise disabled'), |
|
55 | + new CensusColumnNull($this, 'School', 'Attended school within the census year'), |
|
56 | + new CensusColumnNull($this, 'Read', 'Cannot read'), |
|
57 | + new CensusColumnNull($this, 'Write', 'Cannot write'), |
|
58 | + new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth, naming the state, territory, or country'), |
|
59 | + new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father, naming the state, territory, or country'), |
|
60 | + new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother, naming the state, territory, or country'), |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | } |
@@ -19,19 +19,19 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class Census { |
22 | - /** |
|
23 | - * @return CensusPlaceInterface[] |
|
24 | - */ |
|
25 | - public static function allCensusPlaces() { |
|
26 | - return array( |
|
27 | - new CensusOfCzechRepublic, |
|
28 | - new CensusOfDenmark, |
|
29 | - new CensusOfDeutschland, |
|
30 | - new CensusOfEngland, |
|
31 | - new CensusOfFrance, |
|
32 | - new CensusOfScotland, |
|
33 | - new CensusOfUnitedStates, |
|
34 | - new CensusOfWales, |
|
35 | - ); |
|
36 | - } |
|
22 | + /** |
|
23 | + * @return CensusPlaceInterface[] |
|
24 | + */ |
|
25 | + public static function allCensusPlaces() { |
|
26 | + return array( |
|
27 | + new CensusOfCzechRepublic, |
|
28 | + new CensusOfDenmark, |
|
29 | + new CensusOfDeutschland, |
|
30 | + new CensusOfEngland, |
|
31 | + new CensusOfFrance, |
|
32 | + new CensusOfScotland, |
|
33 | + new CensusOfUnitedStates, |
|
34 | + new CensusOfWales, |
|
35 | + ); |
|
36 | + } |
|
37 | 37 | } |
@@ -19,19 +19,19 @@ |
||
19 | 19 | * Marital status. |
20 | 20 | */ |
21 | 21 | class CensusColumnConditionEnglish extends AbstractCensusColumnCondition { |
22 | - /* Text to display for married individuals */ |
|
23 | - protected $husband = 'Mar'; |
|
24 | - protected $wife = 'Mar'; |
|
22 | + /* Text to display for married individuals */ |
|
23 | + protected $husband = 'Mar'; |
|
24 | + protected $wife = 'Mar'; |
|
25 | 25 | |
26 | - /* Text to display for unmarried individuals */ |
|
27 | - protected $bachelor = 'Unm'; |
|
28 | - protected $spinster = 'Unm'; |
|
26 | + /* Text to display for unmarried individuals */ |
|
27 | + protected $bachelor = 'Unm'; |
|
28 | + protected $spinster = 'Unm'; |
|
29 | 29 | |
30 | - /* Text to display for divorced individuals */ |
|
31 | - protected $divorce = 'Div'; |
|
32 | - protected $divorcee = 'Div'; |
|
30 | + /* Text to display for divorced individuals */ |
|
31 | + protected $divorce = 'Div'; |
|
32 | + protected $divorcee = 'Div'; |
|
33 | 33 | |
34 | - /* Text to display for widowed individuals (not yet implemented) */ |
|
35 | - protected $widower = 'Wid'; |
|
36 | - protected $widow = 'Wid'; |
|
34 | + /* Text to display for widowed individuals (not yet implemented) */ |
|
35 | + protected $widower = 'Wid'; |
|
36 | + protected $widow = 'Wid'; |
|
37 | 37 | } |
@@ -22,165 +22,165 @@ |
||
22 | 22 | * Marital status. |
23 | 23 | */ |
24 | 24 | abstract class AbstractCensusColumnCondition extends AbstractCensusColumn implements CensusColumnInterface { |
25 | - /* Text to display for married males */ |
|
26 | - protected $husband = ''; |
|
27 | - |
|
28 | - /* Text to display for married females */ |
|
29 | - protected $wife = ''; |
|
30 | - |
|
31 | - /* Text to display for unmarried males */ |
|
32 | - protected $bachelor = ''; |
|
33 | - |
|
34 | - /* Text to display for unmarried females */ |
|
35 | - protected $spinster = ''; |
|
36 | - |
|
37 | - /* Text to display for male children */ |
|
38 | - protected $boy = ''; |
|
39 | - |
|
40 | - /* Text to display for female children */ |
|
41 | - protected $girl = ''; |
|
42 | - |
|
43 | - /* Text to display for divorced males */ |
|
44 | - protected $divorce = ''; |
|
45 | - |
|
46 | - /* Text to display for divorced females */ |
|
47 | - protected $divorcee = ''; |
|
48 | - |
|
49 | - /* Text to display for widowed males */ |
|
50 | - protected $widower = ''; |
|
51 | - |
|
52 | - /* Text to display for widowed females */ |
|
53 | - protected $widow = ''; |
|
54 | - |
|
55 | - /* At what age is this individual recorded as an adult */ |
|
56 | - protected $age_adult = 15; |
|
57 | - |
|
58 | - /** |
|
59 | - * Generate the likely value of this census column, based on available information. |
|
60 | - * |
|
61 | - * @param Individual $individual |
|
62 | - * @param Individual|null $head |
|
63 | - * |
|
64 | - * @return string |
|
65 | - */ |
|
66 | - public function generate(Individual $individual, Individual $head = null) { |
|
67 | - $family = $this->spouseFamily($individual); |
|
68 | - $sex = $individual->getSex(); |
|
69 | - |
|
70 | - if ($family === null || count($family->getFacts('_NMR')) > 0) { |
|
71 | - if ($this->isChild($individual)) { |
|
72 | - return $this->conditionChild($sex); |
|
73 | - } else { |
|
74 | - return $this->conditionSingle($sex); |
|
75 | - } |
|
76 | - } elseif (count($family->getFacts('DIV')) > 0) { |
|
77 | - return $this->conditionDivorced($sex); |
|
78 | - } else { |
|
79 | - $spouse = $family->getSpouse($individual); |
|
80 | - if ($spouse instanceof Individual && $this->isDead($spouse)) { |
|
81 | - return $this->conditionWidowed($sex); |
|
82 | - } else { |
|
83 | - return $this->conditionMarried($sex); |
|
84 | - } |
|
85 | - } |
|
86 | - } |
|
87 | - |
|
88 | - /** |
|
89 | - * How is this condition written in a census column. |
|
90 | - * |
|
91 | - * @param string $sex |
|
92 | - * |
|
93 | - * @return string |
|
94 | - */ |
|
95 | - private function conditionChild($sex) { |
|
96 | - if ($sex === 'F') { |
|
97 | - return $this->girl; |
|
98 | - } else { |
|
99 | - return $this->boy; |
|
100 | - } |
|
101 | - } |
|
102 | - |
|
103 | - /** |
|
104 | - * How is this condition written in a census column. |
|
105 | - * |
|
106 | - * @param string $sex |
|
107 | - * |
|
108 | - * @return string |
|
109 | - */ |
|
110 | - private function conditionDivorced($sex) { |
|
111 | - if ($sex === 'F') { |
|
112 | - return $this->divorcee; |
|
113 | - } else { |
|
114 | - return $this->divorce; |
|
115 | - } |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * How is this condition written in a census column. |
|
120 | - * |
|
121 | - * @param string $sex |
|
122 | - * |
|
123 | - * @return string |
|
124 | - */ |
|
125 | - private function conditionMarried($sex) { |
|
126 | - if ($sex === 'F') { |
|
127 | - return $this->wife; |
|
128 | - } else { |
|
129 | - return $this->husband; |
|
130 | - } |
|
131 | - } |
|
132 | - |
|
133 | - /** |
|
134 | - * How is this condition written in a census column. |
|
135 | - * |
|
136 | - * @param string $sex |
|
137 | - * |
|
138 | - * @return string |
|
139 | - */ |
|
140 | - private function conditionSingle($sex) { |
|
141 | - if ($sex === 'F') { |
|
142 | - return $this->spinster; |
|
143 | - } else { |
|
144 | - return $this->bachelor; |
|
145 | - } |
|
146 | - } |
|
147 | - |
|
148 | - /** |
|
149 | - * How is this condition written in a census column. |
|
150 | - * |
|
151 | - * @param string $sex |
|
152 | - * |
|
153 | - * @return string |
|
154 | - */ |
|
155 | - private function conditionWidowed($sex) { |
|
156 | - if ($sex === 'F') { |
|
157 | - return $this->widow; |
|
158 | - } else { |
|
159 | - return $this->widower; |
|
160 | - } |
|
161 | - } |
|
162 | - |
|
163 | - /** |
|
164 | - * Is the individual a child. |
|
165 | - * |
|
166 | - * @param Individual $individual |
|
167 | - * |
|
168 | - * @return bool |
|
169 | - */ |
|
170 | - private function isChild(Individual $individual) { |
|
171 | - $age = (int) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
|
172 | - |
|
173 | - return $age < $this->age_adult; |
|
174 | - } |
|
175 | - |
|
176 | - /** |
|
177 | - * Is the individual dead. |
|
178 | - * |
|
179 | - * @param Individual $individual |
|
180 | - * |
|
181 | - * @return bool |
|
182 | - */ |
|
183 | - private function isDead(Individual $individual) { |
|
184 | - return $individual->getDeathDate()->isOK() && Date::compare($individual->getDeathDate(), $this->date()) < 0; |
|
185 | - } |
|
25 | + /* Text to display for married males */ |
|
26 | + protected $husband = ''; |
|
27 | + |
|
28 | + /* Text to display for married females */ |
|
29 | + protected $wife = ''; |
|
30 | + |
|
31 | + /* Text to display for unmarried males */ |
|
32 | + protected $bachelor = ''; |
|
33 | + |
|
34 | + /* Text to display for unmarried females */ |
|
35 | + protected $spinster = ''; |
|
36 | + |
|
37 | + /* Text to display for male children */ |
|
38 | + protected $boy = ''; |
|
39 | + |
|
40 | + /* Text to display for female children */ |
|
41 | + protected $girl = ''; |
|
42 | + |
|
43 | + /* Text to display for divorced males */ |
|
44 | + protected $divorce = ''; |
|
45 | + |
|
46 | + /* Text to display for divorced females */ |
|
47 | + protected $divorcee = ''; |
|
48 | + |
|
49 | + /* Text to display for widowed males */ |
|
50 | + protected $widower = ''; |
|
51 | + |
|
52 | + /* Text to display for widowed females */ |
|
53 | + protected $widow = ''; |
|
54 | + |
|
55 | + /* At what age is this individual recorded as an adult */ |
|
56 | + protected $age_adult = 15; |
|
57 | + |
|
58 | + /** |
|
59 | + * Generate the likely value of this census column, based on available information. |
|
60 | + * |
|
61 | + * @param Individual $individual |
|
62 | + * @param Individual|null $head |
|
63 | + * |
|
64 | + * @return string |
|
65 | + */ |
|
66 | + public function generate(Individual $individual, Individual $head = null) { |
|
67 | + $family = $this->spouseFamily($individual); |
|
68 | + $sex = $individual->getSex(); |
|
69 | + |
|
70 | + if ($family === null || count($family->getFacts('_NMR')) > 0) { |
|
71 | + if ($this->isChild($individual)) { |
|
72 | + return $this->conditionChild($sex); |
|
73 | + } else { |
|
74 | + return $this->conditionSingle($sex); |
|
75 | + } |
|
76 | + } elseif (count($family->getFacts('DIV')) > 0) { |
|
77 | + return $this->conditionDivorced($sex); |
|
78 | + } else { |
|
79 | + $spouse = $family->getSpouse($individual); |
|
80 | + if ($spouse instanceof Individual && $this->isDead($spouse)) { |
|
81 | + return $this->conditionWidowed($sex); |
|
82 | + } else { |
|
83 | + return $this->conditionMarried($sex); |
|
84 | + } |
|
85 | + } |
|
86 | + } |
|
87 | + |
|
88 | + /** |
|
89 | + * How is this condition written in a census column. |
|
90 | + * |
|
91 | + * @param string $sex |
|
92 | + * |
|
93 | + * @return string |
|
94 | + */ |
|
95 | + private function conditionChild($sex) { |
|
96 | + if ($sex === 'F') { |
|
97 | + return $this->girl; |
|
98 | + } else { |
|
99 | + return $this->boy; |
|
100 | + } |
|
101 | + } |
|
102 | + |
|
103 | + /** |
|
104 | + * How is this condition written in a census column. |
|
105 | + * |
|
106 | + * @param string $sex |
|
107 | + * |
|
108 | + * @return string |
|
109 | + */ |
|
110 | + private function conditionDivorced($sex) { |
|
111 | + if ($sex === 'F') { |
|
112 | + return $this->divorcee; |
|
113 | + } else { |
|
114 | + return $this->divorce; |
|
115 | + } |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * How is this condition written in a census column. |
|
120 | + * |
|
121 | + * @param string $sex |
|
122 | + * |
|
123 | + * @return string |
|
124 | + */ |
|
125 | + private function conditionMarried($sex) { |
|
126 | + if ($sex === 'F') { |
|
127 | + return $this->wife; |
|
128 | + } else { |
|
129 | + return $this->husband; |
|
130 | + } |
|
131 | + } |
|
132 | + |
|
133 | + /** |
|
134 | + * How is this condition written in a census column. |
|
135 | + * |
|
136 | + * @param string $sex |
|
137 | + * |
|
138 | + * @return string |
|
139 | + */ |
|
140 | + private function conditionSingle($sex) { |
|
141 | + if ($sex === 'F') { |
|
142 | + return $this->spinster; |
|
143 | + } else { |
|
144 | + return $this->bachelor; |
|
145 | + } |
|
146 | + } |
|
147 | + |
|
148 | + /** |
|
149 | + * How is this condition written in a census column. |
|
150 | + * |
|
151 | + * @param string $sex |
|
152 | + * |
|
153 | + * @return string |
|
154 | + */ |
|
155 | + private function conditionWidowed($sex) { |
|
156 | + if ($sex === 'F') { |
|
157 | + return $this->widow; |
|
158 | + } else { |
|
159 | + return $this->widower; |
|
160 | + } |
|
161 | + } |
|
162 | + |
|
163 | + /** |
|
164 | + * Is the individual a child. |
|
165 | + * |
|
166 | + * @param Individual $individual |
|
167 | + * |
|
168 | + * @return bool |
|
169 | + */ |
|
170 | + private function isChild(Individual $individual) { |
|
171 | + $age = (int) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
|
172 | + |
|
173 | + return $age < $this->age_adult; |
|
174 | + } |
|
175 | + |
|
176 | + /** |
|
177 | + * Is the individual dead. |
|
178 | + * |
|
179 | + * @param Individual $individual |
|
180 | + * |
|
181 | + * @return bool |
|
182 | + */ |
|
183 | + private function isDead(Individual $individual) { |
|
184 | + return $individual->getDeathDate()->isOK() && Date::compare($individual->getDeathDate(), $this->date()) < 0; |
|
185 | + } |
|
186 | 186 | } |
@@ -21,21 +21,21 @@ |
||
21 | 21 | * The individual's date of birth. |
22 | 22 | */ |
23 | 23 | class CensusColumnBirthDaySlashMonth 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'); |
|
37 | - } else { |
|
38 | - return ''; |
|
39 | - } |
|
40 | - } |
|
35 | + if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) { |
|
36 | + return $birth_date->minimumDate()->format('%j/%n'); |
|
37 | + } else { |
|
38 | + return ''; |
|
39 | + } |
|
40 | + } |
|
41 | 41 | } |
@@ -19,36 +19,36 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfDenmark1921 extends CensusOfDenmark implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '01 FEB 1921'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '01 FEB 1921'; |
|
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 CensusColumnBirthDaySlashMonth($this, 'Fødselsdag', ''), |
|
41 | - new CensusColumnBirthYear($this, 'Fødselsaar', ''), |
|
42 | - new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'), |
|
43 | - new CensusColumnBirthPlace($this, 'Fødested', ''), |
|
44 | - new CensusColumnNull($this, '', ''), |
|
45 | - new CensusColumnNull($this, '', ''), |
|
46 | - new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'), |
|
47 | - new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'), |
|
48 | - new CensusColumnOccupation($this, 'Erhverv', ''), |
|
49 | - new CensusColumnNull($this, '', ''), |
|
50 | - new CensusColumnNull($this, '', ''), |
|
51 | - new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'), |
|
52 | - ); |
|
53 | - } |
|
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 CensusColumnBirthDaySlashMonth($this, 'Fødselsdag', ''), |
|
41 | + new CensusColumnBirthYear($this, 'Fødselsaar', ''), |
|
42 | + new CensusColumnConditionDanish($this, 'Civilstand', 'Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).'), |
|
43 | + new CensusColumnBirthPlace($this, 'Fødested', ''), |
|
44 | + new CensusColumnNull($this, '', ''), |
|
45 | + new CensusColumnNull($this, '', ''), |
|
46 | + new CensusColumnReligion($this, 'Trossamfund', 'Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).'), |
|
47 | + new CensusColumnRelationToHead($this, 'Stilling i familien', 'Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner'), |
|
48 | + new CensusColumnOccupation($this, 'Erhverv', ''), |
|
49 | + new CensusColumnNull($this, '', ''), |
|
50 | + new CensusColumnNull($this, '', ''), |
|
51 | + new CensusColumnNull($this, 'Anmærkninger', 'Anmærkninger.'), |
|
52 | + ); |
|
53 | + } |
|
54 | 54 | } |
@@ -19,30 +19,30 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfEngland1861 extends CensusOfEngland implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '07 APR 1861'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '07 APR 1861'; |
|
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 blind or deaf-and-dumb'), |
|
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 blind or deaf-and-dumb'), |
|
46 | + ); |
|
47 | + } |
|
48 | 48 | } |
@@ -19,51 +19,51 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfUnitedStates1910 extends CensusOfUnitedStates implements CensusInterface { |
22 | - /** |
|
23 | - * When did this census occur. |
|
24 | - * |
|
25 | - * @return string |
|
26 | - */ |
|
27 | - public function censusDate() { |
|
28 | - return '15 APR 1910'; |
|
29 | - } |
|
22 | + /** |
|
23 | + * When did this census occur. |
|
24 | + * |
|
25 | + * @return string |
|
26 | + */ |
|
27 | + public function censusDate() { |
|
28 | + return '15 APR 1910'; |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * The columns of the census. |
|
33 | - * |
|
34 | - * @return CensusColumnInterface[] |
|
35 | - */ |
|
36 | - public function columns() { |
|
37 | - return array( |
|
38 | - new CensusColumnSurnameGivenNameInitial($this, 'Name', 'Name'), |
|
39 | - new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'), |
|
40 | - new CensusColumnSexMF($this, 'Sex', 'Sex'), |
|
41 | - new CensusColumnNull($this, 'Race', 'Color or race'), |
|
42 | - new CensusColumnAge($this, 'Age', 'Age at last birthday'), |
|
43 | - new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'), |
|
44 | - new CensusColumnYearsMarried($this, 'Marr', 'Number of years of present marriage'), |
|
45 | - new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'), |
|
46 | - new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'), |
|
47 | - new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'), |
|
48 | - new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'), |
|
49 | - new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'), |
|
50 | - new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'), |
|
51 | - new CensusColumnNull($this, 'Nat', 'Whether naturalized or alien'), |
|
52 | - new CensusColumnNull($this, 'Lang', 'Whether able to speak English, of if not, give language spoken'), |
|
53 | - new CensusColumnOccupation($this, 'Occupation', 'Trade or profession of, or particular kind of work done by this person'), |
|
54 | - new CensusColumnNull($this, 'Ind', 'General nature of industry'), |
|
55 | - new CensusColumnNull($this, 'Emp', 'Whether an employer, employee, or work on own account'), |
|
56 | - new CensusColumnNull($this, 'Unemp', 'Whether out of work on April 15, 1910'), |
|
57 | - new CensusColumnNull($this, 'Unemp', 'Number of weeks out of work in 1909'), |
|
58 | - new CensusColumnNull($this, 'R', 'Whether able to read'), |
|
59 | - new CensusColumnNull($this, 'W', 'Whether able to write'), |
|
60 | - new CensusColumnNull($this, 'Sch', 'Attended school since September 1, 1909'), |
|
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 | - new CensusColumnNull($this, 'CW', 'Whether a survivor of the Union or Confederate Army or Navy'), |
|
65 | - new CensusColumnNull($this, 'Blind', 'Whether blind (both eyes)'), |
|
66 | - new CensusColumnNull($this, 'Deaf', 'Whether deaf and dumb'), |
|
67 | - ); |
|
68 | - } |
|
31 | + /** |
|
32 | + * The columns of the census. |
|
33 | + * |
|
34 | + * @return CensusColumnInterface[] |
|
35 | + */ |
|
36 | + public function columns() { |
|
37 | + return array( |
|
38 | + new CensusColumnSurnameGivenNameInitial($this, 'Name', 'Name'), |
|
39 | + new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'), |
|
40 | + new CensusColumnSexMF($this, 'Sex', 'Sex'), |
|
41 | + new CensusColumnNull($this, 'Race', 'Color or race'), |
|
42 | + new CensusColumnAge($this, 'Age', 'Age at last birthday'), |
|
43 | + new CensusColumnConditionUs($this, 'Cond', 'Whether single, married, widowed, or divorced'), |
|
44 | + new CensusColumnYearsMarried($this, 'Marr', 'Number of years of present marriage'), |
|
45 | + new CensusColumnChildrenBornAlive($this, 'Chil', 'Mother of how many children'), |
|
46 | + new CensusColumnChildrenLiving($this, 'Chil', 'Number of these children living'), |
|
47 | + new CensusColumnBirthPlaceSimple($this, 'BP', 'Place of birth of this person'), |
|
48 | + new CensusColumnFatherBirthPlaceSimple($this, 'FBP', 'Place of birth of father of this person'), |
|
49 | + new CensusColumnMotherBirthPlaceSimple($this, 'MBP', 'Place of birth of mother of this person'), |
|
50 | + new CensusColumnNull($this, 'Imm', 'Year of immigration to the United States'), |
|
51 | + new CensusColumnNull($this, 'Nat', 'Whether naturalized or alien'), |
|
52 | + new CensusColumnNull($this, 'Lang', 'Whether able to speak English, of if not, give language spoken'), |
|
53 | + new CensusColumnOccupation($this, 'Occupation', 'Trade or profession of, or particular kind of work done by this person'), |
|
54 | + new CensusColumnNull($this, 'Ind', 'General nature of industry'), |
|
55 | + new CensusColumnNull($this, 'Emp', 'Whether an employer, employee, or work on own account'), |
|
56 | + new CensusColumnNull($this, 'Unemp', 'Whether out of work on April 15, 1910'), |
|
57 | + new CensusColumnNull($this, 'Unemp', 'Number of weeks out of work in 1909'), |
|
58 | + new CensusColumnNull($this, 'R', 'Whether able to read'), |
|
59 | + new CensusColumnNull($this, 'W', 'Whether able to write'), |
|
60 | + new CensusColumnNull($this, 'Sch', 'Attended school since September 1, 1909'), |
|
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 | + new CensusColumnNull($this, 'CW', 'Whether a survivor of the Union or Confederate Army or Navy'), |
|
65 | + new CensusColumnNull($this, 'Blind', 'Whether blind (both eyes)'), |
|
66 | + new CensusColumnNull($this, 'Deaf', 'Whether deaf and dumb'), |
|
67 | + ); |
|
68 | + } |
|
69 | 69 | } |