@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfFrance1861 extends CensusOfFrance implements CensusInterface { |
|
21 | +class CensusOfFrance1861 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 '17 JAN 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 CensusColumnSurname($this, 'Noms', 'Noms de famille'), |
39 | 42 | new CensusColumnGivenNames($this, 'Prénoms', ''), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1890 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1890 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 '02 JUN 1890'; |
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 CensusColumnGivenNameInitial($this, 'Name', 'Christian name in full, and initial of middle name'), |
39 | 42 | new CensusColumnSurname($this, 'Surname', 'Surname'), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfFrance1891 extends CensusOfFrance implements CensusInterface { |
|
21 | +class CensusOfFrance1891 extends CensusOfFrance implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '15 JAN 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 CensusColumnSurname($this, 'Noms', 'Noms de famille'), |
39 | 42 | new CensusColumnGivenNames($this, 'Prénoms', ''), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1835 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1835 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 '18 FEB 1835'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return string |
35 | 37 | */ |
36 | - public function censusPlace() { |
|
38 | + public function censusPlace() |
|
39 | + { |
|
37 | 40 | return 'Schleswig-Holstein, Deutschland'; |
38 | 41 | } |
39 | 42 | |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return CensusColumnInterface[] |
44 | 47 | */ |
45 | - public function columns() { |
|
48 | + public function columns() |
|
49 | + { |
|
46 | 50 | return array( |
47 | 51 | new CensusColumnFullName($this, 'Navn', ''), |
48 | 52 | new CensusColumnAge($this, 'Alder', ''), |
@@ -22,7 +22,8 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Definitions for a census column |
24 | 24 | */ |
25 | -class AbstractCensusColumn { |
|
25 | +class AbstractCensusColumn |
|
26 | +{ |
|
26 | 27 | /** @var CensusInterface */ |
27 | 28 | private $census; |
28 | 29 | |
@@ -39,7 +40,8 @@ discard block |
||
39 | 40 | * @param string $abbr - The abbrievated on-screen name "BiC" |
40 | 41 | * @param string $title - The full column heading "Born in the county" |
41 | 42 | */ |
42 | - public function __construct(CensusInterface $census, $abbr, $title) { |
|
43 | + public function __construct(CensusInterface $census, $abbr, $title) |
|
44 | + { |
|
43 | 45 | $this->census = $census; |
44 | 46 | $this->abbr = $abbr; |
45 | 47 | $this->title = $title; |
@@ -50,7 +52,8 @@ discard block |
||
50 | 52 | * |
51 | 53 | * @return string |
52 | 54 | */ |
53 | - public function abbreviation() { |
|
55 | + public function abbreviation() |
|
56 | + { |
|
54 | 57 | return $this->abbr; |
55 | 58 | } |
56 | 59 | |
@@ -61,7 +64,8 @@ discard block |
||
61 | 64 | * |
62 | 65 | * @return string - e.g. "England" |
63 | 66 | */ |
64 | - protected function lastPartOfPlace($place) { |
|
67 | + protected function lastPartOfPlace($place) |
|
68 | + { |
|
65 | 69 | $place = explode(', ', $place); |
66 | 70 | |
67 | 71 | return end($place); |
@@ -72,7 +76,8 @@ discard block |
||
72 | 76 | * |
73 | 77 | * @return Date |
74 | 78 | */ |
75 | - public function date() { |
|
79 | + public function date() |
|
80 | + { |
|
76 | 81 | return new Date($this->census->censusDate()); |
77 | 82 | } |
78 | 83 | |
@@ -83,7 +88,8 @@ discard block |
||
83 | 88 | * |
84 | 89 | * @return Individual|null |
85 | 90 | */ |
86 | - public function father(Individual $individual) { |
|
91 | + public function father(Individual $individual) |
|
92 | + { |
|
87 | 93 | $family = $individual->getPrimaryChildFamily(); |
88 | 94 | |
89 | 95 | if ($family) { |
@@ -100,7 +106,8 @@ discard block |
||
100 | 106 | * |
101 | 107 | * @return Individual|null |
102 | 108 | */ |
103 | - public function mother(Individual $individual) { |
|
109 | + public function mother(Individual $individual) |
|
110 | + { |
|
104 | 111 | $family = $individual->getPrimaryChildFamily(); |
105 | 112 | |
106 | 113 | if ($family) { |
@@ -117,7 +124,8 @@ discard block |
||
117 | 124 | * |
118 | 125 | * @return string - e.g. "London" (for census of England) and "London, England" elsewhere |
119 | 126 | */ |
120 | - protected function notCountry($place) { |
|
127 | + protected function notCountry($place) |
|
128 | + { |
|
121 | 129 | $parts = explode(', ', $place); |
122 | 130 | |
123 | 131 | if (end($parts) === $this->place()) { |
@@ -132,7 +140,8 @@ discard block |
||
132 | 140 | * |
133 | 141 | * @return string |
134 | 142 | */ |
135 | - public function place() { |
|
143 | + public function place() |
|
144 | + { |
|
136 | 145 | return $this->census->censusPlace(); |
137 | 146 | } |
138 | 147 | |
@@ -143,7 +152,8 @@ discard block |
||
143 | 152 | * |
144 | 153 | * @return Family|null |
145 | 154 | */ |
146 | - public function spouseFamily(Individual $individual) { |
|
155 | + public function spouseFamily(Individual $individual) |
|
156 | + { |
|
147 | 157 | // Exclude families that were created after this census date |
148 | 158 | $families = array(); |
149 | 159 | foreach ($individual->getSpouseFamilies() as $family) { |
@@ -166,7 +176,8 @@ discard block |
||
166 | 176 | * |
167 | 177 | * @return string |
168 | 178 | */ |
169 | - public function title() { |
|
179 | + public function title() |
|
180 | + { |
|
170 | 181 | return $this->title; |
171 | 182 | } |
172 | 183 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfFrance1876 extends CensusOfFrance implements CensusInterface { |
|
21 | +class CensusOfFrance1876 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 '20 JAN 1876'; |
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', ''), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1920 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1920 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 'JAN 1920'; |
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'), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1803 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1803 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 1803'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return string |
35 | 37 | */ |
36 | - public function censusPlace() { |
|
38 | + public function censusPlace() |
|
39 | + { |
|
37 | 40 | return 'Schleswig-Holstein, Deutschland'; |
38 | 41 | } |
39 | 42 | |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return CensusColumnInterface[] |
44 | 47 | */ |
45 | - public function columns() { |
|
48 | + public function columns() |
|
49 | + { |
|
46 | 50 | return array( |
47 | 51 | new CensusColumnFullName($this, 'Navn', ''), |
48 | 52 | new CensusColumnRelationToHead($this, 'Stilling i familien', ''), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1925 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1925 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 '05 NOV 1925'; |
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).'), |