@@ -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 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1880 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1880 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 'JUN 1880'; |
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,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 | } |
@@ -18,11 +18,13 @@ |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class Census { |
|
21 | +class Census |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * @return CensusPlaceInterface[] |
24 | 25 | */ |
25 | - public static function allCensusPlaces() { |
|
26 | + public static function allCensusPlaces() |
|
27 | + { |
|
26 | 28 | return array( |
27 | 29 | new CensusOfCzechRepublic, |
28 | 30 | new CensusOfDenmark, |
@@ -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 | } |
@@ -18,7 +18,8 @@ |
||
18 | 18 | /** |
19 | 19 | * Marital status. |
20 | 20 | */ |
21 | -class CensusColumnConditionEnglish extends AbstractCensusColumnCondition { |
|
21 | +class CensusColumnConditionEnglish extends AbstractCensusColumnCondition |
|
22 | +{ |
|
22 | 23 | /* Text to display for married individuals */ |
23 | 24 | protected $husband = 'Mar'; |
24 | 25 | protected $wife = 'Mar'; |
@@ -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,7 +21,8 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * Marital status. |
23 | 23 | */ |
24 | -abstract class AbstractCensusColumnCondition extends AbstractCensusColumn implements CensusColumnInterface { |
|
24 | +abstract class AbstractCensusColumnCondition extends AbstractCensusColumn implements CensusColumnInterface |
|
25 | +{ |
|
25 | 26 | /* Text to display for married males */ |
26 | 27 | protected $husband = ''; |
27 | 28 | |
@@ -63,7 +64,8 @@ discard block |
||
63 | 64 | * |
64 | 65 | * @return string |
65 | 66 | */ |
66 | - public function generate(Individual $individual, Individual $head = null) { |
|
67 | + public function generate(Individual $individual, Individual $head = null) |
|
68 | + { |
|
67 | 69 | $family = $this->spouseFamily($individual); |
68 | 70 | $sex = $individual->getSex(); |
69 | 71 | |
@@ -92,7 +94,8 @@ discard block |
||
92 | 94 | * |
93 | 95 | * @return string |
94 | 96 | */ |
95 | - private function conditionChild($sex) { |
|
97 | + private function conditionChild($sex) |
|
98 | + { |
|
96 | 99 | if ($sex === 'F') { |
97 | 100 | return $this->girl; |
98 | 101 | } else { |
@@ -107,7 +110,8 @@ discard block |
||
107 | 110 | * |
108 | 111 | * @return string |
109 | 112 | */ |
110 | - private function conditionDivorced($sex) { |
|
113 | + private function conditionDivorced($sex) |
|
114 | + { |
|
111 | 115 | if ($sex === 'F') { |
112 | 116 | return $this->divorcee; |
113 | 117 | } else { |
@@ -122,7 +126,8 @@ discard block |
||
122 | 126 | * |
123 | 127 | * @return string |
124 | 128 | */ |
125 | - private function conditionMarried($sex) { |
|
129 | + private function conditionMarried($sex) |
|
130 | + { |
|
126 | 131 | if ($sex === 'F') { |
127 | 132 | return $this->wife; |
128 | 133 | } else { |
@@ -137,7 +142,8 @@ discard block |
||
137 | 142 | * |
138 | 143 | * @return string |
139 | 144 | */ |
140 | - private function conditionSingle($sex) { |
|
145 | + private function conditionSingle($sex) |
|
146 | + { |
|
141 | 147 | if ($sex === 'F') { |
142 | 148 | return $this->spinster; |
143 | 149 | } else { |
@@ -152,7 +158,8 @@ discard block |
||
152 | 158 | * |
153 | 159 | * @return string |
154 | 160 | */ |
155 | - private function conditionWidowed($sex) { |
|
161 | + private function conditionWidowed($sex) |
|
162 | + { |
|
156 | 163 | if ($sex === 'F') { |
157 | 164 | return $this->widow; |
158 | 165 | } else { |
@@ -167,7 +174,8 @@ discard block |
||
167 | 174 | * |
168 | 175 | * @return bool |
169 | 176 | */ |
170 | - private function isChild(Individual $individual) { |
|
177 | + private function isChild(Individual $individual) |
|
178 | + { |
|
171 | 179 | $age = (int) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
172 | 180 | |
173 | 181 | return $age < $this->age_adult; |
@@ -180,7 +188,8 @@ discard block |
||
180 | 188 | * |
181 | 189 | * @return bool |
182 | 190 | */ |
183 | - private function isDead(Individual $individual) { |
|
191 | + private function isDead(Individual $individual) |
|
192 | + { |
|
184 | 193 | return $individual->getDeathDate()->isOK() && Date::compare($individual->getDeathDate(), $this->date()) < 0; |
185 | 194 | } |
186 | 195 | } |
@@ -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 | } |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * The individual's date of birth. |
22 | 22 | */ |
23 | -class CensusColumnBirthDaySlashMonth extends AbstractCensusColumn implements CensusColumnInterface { |
|
23 | +class CensusColumnBirthDaySlashMonth 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,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 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1921 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1921 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 1921'; |
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).'), |
@@ -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 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfEngland1861 extends CensusOfEngland implements CensusInterface { |
|
21 | +class CensusOfEngland1861 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 '07 APR 1861'; |
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,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 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1910 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1910 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 '15 APR 1910'; |
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 CensusColumnSurnameGivenNameInitial($this, 'Name', 'Name'), |
39 | 42 | new CensusColumnRelationToHead($this, 'Relation', 'Relationship of each person to the head of the family'), |
@@ -19,33 +19,33 @@ |
||
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | 21 | class CensusOfWales1891 extends CensusOfWales 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 CensusOfWales1891 extends CensusOfWales implements CensusInterface { |
|
21 | +class CensusOfWales1891 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 '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'), |